Link to home
Start Free TrialLog in
Avatar of smfmetro10
smfmetro10Flag for United States of America

asked on

How do you use the auto stop feature in jQuery?

Hi,
I am trying to get the auto stop feature to work in my image slider.

This is what I have but it doesn't work.

Any help would be greatly apprectiated

 <script>
        jQuery(document).ready(function($) {

          $('#banner-fade').bjqs({
			animtype      : 'fade',
            height      : 236,
            width       : 658,
			 autostop:    1,
            responsive  : true
          });

        });
      </script>

Open in new window

Avatar of quizwedge
quizwedge
Flag of United States of America image

I'm not certain which jQuery slider you're using, but I'm guessing it's the one at http://www.basic-slider.com/ Check out the options at the bottom of that page. Autostop isn't one of the options, but automatic is. If you want the slide to not automatically switch between slides, try changing "autostop: 1" to "automatic: false" in your code.
Avatar of smfmetro10

ASKER

Thanks for the reply.

Yeah that's the one.  Ideally I would like it to loop through completely once then stop on the first slide.
That slider doesn't have events available so it's not built into the plug-in. You could try looking through the plug-in source code and find anywhere the slide change is being made. Check to see if you're on the last slide. If you are, then set automatic to false and move to the first slide.

The better solution is probably to find a different slider or carousel that has an on change event or has the functionality you want built in.
ASKER CERTIFIED SOLUTION
Avatar of Md Shah
Md Shah
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Outstanding! This works perfectly!
Thank you SO Much!!

Happy To Help :)

Good Luck for further coding !!!