Jump to content

mouse over control on rotating text in html


shwetharaya

Recommended Posts

Hi all, Can anyone send me the logic or code to have a roating text with 3sec (to change for every text )and can control the text change on mouseover control. please can anyone send me the code imm.....its an urgent issue. and also can we have next and previous button to control the flow of text.IN detail, we have set of text say 3 textwhich will keep changing one after the other every 3sec one its changes to the last 3rd text it will again come back to the 1text and process continues. so mean while when its changing can we have mouse over control . i.e when the user places the mouse on th etext its should pause and on mouse out it should contiue the text rotation . is it possible to have a next button control and previous button control to read the text or control the floe of text.please help me out.thanks

Link to comment
Share on other sites

I would suggest putting your texts into an array and then using the modulus operator and setInterval() or setTimeout(), you can cycle through the elements in the array. On mouseover, you can clear the timout/interval (clearInterval(), clearTimeout()) so that it'll stop cycling and then on mouseout, you can start the interval again.

Link to comment
Share on other sites

  • 2 weeks later...
I would suggest putting your texts into an array and then using the modulus operator and setInterval() or setTimeout(), you can cycle through the elements in the array. On mouseover, you can clear the timout/interval (clearInterval(), clearTimeout()) so that it'll stop cycling and then on mouseout, you can start the interval again.
Thanks for the reply.Can u please send the code .....it would be of great help. thanks a lot
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...