Inside my anything slider, I have links that open up lightbox. The problem with the way anything slider is set up is that when I click the link inside the slider, the lightbox opens up with the content but the anything slider keeps on looping in the background. How can I stop the slider when a user clicks on a link inside of it?
Before you open the lightbox, just add this bit of script to stop the slide show. Make sure your slider is targeted, I'm using "#mySlider" in the example.
$('#mySlider').data('AnythingSlider').startStop(); // this stops the slideshow
I apologize for the late reply, I was waiting for an email to be sent when someone replied to my question. So I am not that familiar with how to link javascript code to my link inside the document. Can you help me out with this? So for example if my code for the link is this: <a class="video" href="http://www.link.com" title="title"></a> How would I link the JS code you gave me?
My anything slider is placed in a div id="main". I have the function below set to stop the slide when click are done in main.. The slider does not pause and keeps playing.
$(document).ready(function(){
//Pause Slider when Playing
$('#main').click(function(){
$('#slider1').data('AnythingSlider').startStop(); //stop the slideshow
//alert("stop slider.");
});
});
is
$('#slider1').data('AnythingSlider').startStop(); //stop the slideshow
supposed to stop the slide.. I am I missing something? Please Help.
Before you open the lightbox, just add this bit of script to stop the slide show. Make sure your slider is targeted, I'm using "#mySlider" in the example.
<a class="video" href="http://www.link.com" title="title"></a>How would I link the JS code you gave me?
My anything slider is placed in a div id="main". I have the function below set to stop the slide when click are done in main.. The slider does not pause and keeps playing.
$(document).ready(function(){ //Pause Slider when Playing $('#main').click(function(){ $('#slider1').data('AnythingSlider').startStop(); //stop the slideshow //alert("stop slider."); }); });is
supposed to stop the slide.. I am I missing something? Please Help.