Ninja Slider / Posts /

How to detect if the image slider is fully loaded after the page loads

0
I need to call the built-in functions of the Ninja image slider after the page loads. How can I detect if the image slider has been fully loaded and be available for calling its built-in functions?
Ali  9 years ago   viewed: 3350    

1 Answer

0

You can verify its availability by checking: if (typeof nslider != "undefined" && typeof nslider.getSlides() != "undefined"){...}

Please check out its example in the post: http://www.menucool.com/5871/Specify-the-starting-image-slide-of-image-slider-by-page-URL-query-string

<script type="text/javascript"> function switchSlide() { if (typeof nslider != "undefined" && typeof nslider.getSlides() != "undefined") { // It is ready now. You can call the slider's built-in functions ...... } else { setTimeout(switchSlide, 10); } } </script>
Milo   9 years ago

   

Your name*
Password
(Optional. Used to modify this post afterwords)
+ =  

Ask your Own Question

  • If your question is related to the topic of this post, you can post your question to this page by clicking the "Post a reply" button at left;

  • When you want to start a new page for your question: