Jump to content

function not working...


MDanz

Recommended Posts

This is a function for a slideshow,onmouseover i want it to stop. Instead of stopping the slideshow onmouseover, it speeds up??  How can i correct this to stop onmouseover?

<body onload="nextslide();">

 

function nextslide() {

                // Hide current slide
          var object = document.getElementById('slide' + current); //e.g. slide1
          object.style.display = 'none';
             
          // Show next slide, if last, loop back to front
          if (current == last) { current = 1; }
          else { current++ }
          object = document.getElementById('slide' + current);
          object.style.display = 'block';
          var timeout = setTimeout(nextslide, 2500);

		object.onmouseover = function(){ clearTimeout( timeout ) };
object.onmouseout = nextslide;
                                        
       }

Link to comment
https://forums.phpfreaks.com/topic/244712-function-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.