javascript - Stop on hover on a div -
OK, so I'm trying to get the function to function on the hover where the div is hover And resume when my mouse has left the hover area. Even I have so far
HTML
& lt; Div id = "slideshow" & gt; & Lt; Div & gt; & Lt; Iframe width = "400"; "Height =" 290 "src =" www.google.com "& gt; & lt; / iframe & gt; & lt; / div & gt; & lt; div & gt; & lt; iframe width =" 400 ";" Height = "290"; Src = "www.google.com" & gt; & Lt; / Iframe & gt; & Lt; / Div & gt; & Lt; Div & gt; & Lt; Iframe width = "400"; "Height =" 290 "; src =" www.google.com "& gt; & lt; / iframe & gt; & lt; / div & gt; & lt; / div & gt; CSS & style; style & gt; #slideshow {position: relative; width: 340px; height: 340px; padding: 1px; box-shadow: 0 0 20px RGBA (0,0,0,0.4.4);} #SLD show & gt; Div {status: relative; top: 0 pixel; left: 0 pixel; right: 0 px; bottom: 0 pixel;} jQuery
script src = "// ajax.googleapis.com/ajax/libs/jquery/1.11.1 /jquery.min.js"></script> & lt; script & gt; $ ("#SlideShow> div: Gt (0)"). Hover (function) {this.stop ();}, function () {this.start ();}) setInterval (function () ($ ('$ (' ('$' Slide Show & gt; div: first '). FadeOut (0) .next () .FadeIn (1000) .end () .appendTo (' # SlideShow ');}, 10500); & lt; / script & gt; ; Any help on this issue would be greatly appreciated. I have tried a few different things, which have not worked. Such as (), .stop (), and clear interval () I think my execution is all wrong. thank you in advanced .
If you start learning Javascript, you should read the documentation and understand the function to use the API For example understand jquery and other javascript library functions and use it. Start () and this.stop () where do you define it?
Comments
Post a Comment