forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 plugins => Topic started by: Bar6 on August 06, 2011, 05:12:45 pm

Title: Slider plugin - mouseover pause
Post by: Bar6 on August 06, 2011, 05:12:45 pm
Much of the javascript in the Slider plugin is based on the Conveyor Belt slideshow script (http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm). There, the source website mentions that...

Quote
Images can be set to click through to various URLs, and when the mouse moves over the "belt", it pauses for the visitor to interact.

Unlike the source slideshow script, the Slider plugin (version 0.7 at the time of this post) does not «pause» on a mouseover. Turns out that such a feature can easily be «restored» to the Slider plugin. Note the following mouseover events...

onmouseover="copyspeed=0" onmouseout="copyspeed=parseInt(js_vars.slider_copyspeed)"

Specify these mouseover events for the div#slider_auto2 found in codebase.php (and fetch.php if present), as shown below, without deleting any of the existing code...

<div id="slider_autow2" onmouseover="copyspeed=0" onmouseout="copyspeed=parseInt(js_vars.slider_copyspeed)" ...

By simply adding these mouseover events, the Slider plugin will pause on a mouseover, and then resume motion after a mouseout. I've modified the Slider plugin in such a way (including a somewhat slower sliding speed (http://forum.coppermine-gallery.net/index.php/topic,73291.0.html)) for my gallery. Maybe someone will find this info useful.