- License Text
- About Us
- Copyright
- Terms & Conditions
- Contact Us
- Ask Question
- Submit Answer
- License Text
- About Us
- Copyright
- Terms & Conditions
- Contact Us
- Ask Question
- Submit Answer
- Homepage
- jQuery
Stop swiper slide autoplay on mouse enter and start autoplay on mouse leave
How to stop swiper slide autoplay on mouse enter and start autoplay on mouse leave? I have tried .stopAutoplay[] and .startAutoplay[] function but not worked for me.
thank you here is code. and i face console error
Uncaught TypeError: swiper .startAutoplay is not a function
Answer
You need to use the option disableOnInteraction: true rather than binding the events yourself see here for documentation.
Optionally you can use the following for autoplay start stop
swiper.autoplay.start[];
swiper.autoplay.stop[];
Edit
Your mistake is how you are getting the instance for swiper. see below for demo
- How can I stop loaders animation after 3 seconds
Related Post
Recent Posts
- JavaScript
React array map inside map value not rendering
I have an object Array list and this array list includes duplicate values. So I
- JavaScript
Should properties of constants be capitalized? [closed]
I know that it is conventional to capitalize constant values in programming, but would you
- JavaScript
How to looping trough an array of object when array name is not consistent?
Consider below example: const obj ={ price:[{multiple items},{multiple items}], name:"", id:"", } i want to
- JavaScript
Remove input value on backspace keyup
I have a small canonical lottery search form comprising of 6 input fields. Currently when
- JavaScript
How can i do title event with html,css,js
I want the css codes of the blog1popup class to change when the image is
- JavaScript
Best practices writing JavaScript that uses AJAX call to decide if default action should be prevented
I'm using JavaScript and jQuery to write a handler for my form being submitted. Based
- License Text
- About Us
- Copyright
- Terms & Conditions
- Contact Us
- Ask Question
- Submit Answer
- t
- L
This website uses cookies.
Accept