[Plugin: JJ NextGen JQuery Slider] Pause Play
-
Will the following code work with JJ slider:
$('#slider').data('nivoslider').stop(); //Stop the Slider $('#slider').data('nivoslider').start(); //Start the Slider
Trying to build a pause/play button. Although the following code works fine in the Nivo demo, I can’t seem to get it to work with JJ Slider in WordPress.
<script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider(); var nivoStop = "Pause", nivoPlay = "Play"; $('#slider .nivo-controlNav').html($('#slider .nivo-controlNav').html()+'<span class="nivo-stop">'+nivoStop+'</span>'); $('#slider .nivo-stop').click(function(){ if($('#slider').data('nivo:vars').stop){ $('#slider .nivo-stop').html(nivoStop).removeClass('stopped'); }else{ $('#slider .nivo-stop').html(nivoPlay).addClass('stopped'); } $('#slider').data('nivo:vars').stop = !$('#slider').data('nivo:vars').stop; }); }); </script> <style type="text/css"> .nivo-stop{ cursor:pointer; } </style>
Thanks!!
https://www.ads-software.com/extend/plugins/jj-nextgen-jquery-slider/
- The topic ‘[Plugin: JJ NextGen JQuery Slider] Pause Play’ is closed to new replies.