Delay JQuery Animation By Few Seconds
Maybe your like
Delay jQuery animation by few seconds
by vikas I got into a situation where I needed to start the animation after 2 seconds once the mouse is on the image. In other words, need to delay the animation for 2 seconds on mouseover event. So in this post I am sharing the jQuery solution to delay the animation by few seconds.Related Post:
- jQuery.fx.interval Property
- How to disable jQuery animation
- 8 jQuery Loading Animation and Progress Bar Plugin
To delay execution of animation, use .delay() method which allows to delay the execution of functions that follow it in the queue. It accepts duration as parameter. Durations are given in milliseconds; higher values indicate slower animations, not faster ones.
$(document).ready(function () { $('img').mouseenter(function () { $(this).stop().delay(1000).animate({ height: '+=50px', width: '+=50px' }); }); $('img').mouseleave(function () { $(this).stop().delay(1000).animate({ height: '-=50px', width: '-=50px' }); }); }); Demo & CodeFeel free to contact me for any help related to jQuery, I will gladly help you. Scripts Used on This Site
Popular Posts
- Using jQuery's Data APIs
- Merging jQuery Deferreds and .animate()
- A jQuery UI Combobox Under the Hood
- Quick Tip: Prevent Animation Queue Buildup
- Working with Events, part 1
- Improved Animated Scrolling Script for Same-Page Links
Navigation
- Home
- Categories
- Archives
- About
- Contact
Popular Posts
- Using jQuery's Data APIs
- Merging jQuery Deferreds and .animate()
- A jQuery UI Combobox Under the Hood
- Quick Tip: Prevent Animation Queue Buildup
- Working with Events, part 1
- Improved Animated Scrolling Script for Same-Page Links
Recommended Book
-
Learning jQuery,Fourth EditionBy Karl Swedberg & Jonathan Chaffer
Links
Take A Look At Our Achives!What Is This?
Learning jQuery is a multi-author weblog providing jQuery tutorials, demos, and announcements. We have tutorials for all skill levels, and each entry is categorized by level of difficulty.
Pages
- Home
- Categories
- Archives
- About
- Contact
- Cookies and privacy policy
RSS
- Entries (RSS)
- Comments (RSS)
© Copyright 2006–2025 Learning jQuery and participating authors. Written content on this site is under a Creative Commons License. Code examples are under your choice of MIT or GPL license.
Development & Design by Landocs with WordPress
Responsive Menu Add more content here...Tag » Add Delay Animate Jquery
-
.delay() | JQuery API Documentation
-
Can I Use .delay() Together With .animate() In JQuery? - Stack Overflow
-
JQuery Effect Delay() Method - W3Schools
-
Delay Animations In JQuery - TutorialsPanel
-
Jquery Animate Delay Code Example - Code Grepper
-
Delay With Animation Jquery Code Example - Code Grepper
-
Learn To Use JQuery .delay() To Manage Your Effect Queues Better
-
JQuery Delay() Function - JournalDev
-
Animating Numeric Properties With JQuery - Khan Academy
-
Animation-delay - CSS: Cascading Style Sheets - MDN Web Docs
-
Set A Timer To Delay Execution Of Subsequent Items In The Queue
-
How To Delay Animation In JQuery? - Quick
-
What Is The Use Of Delay() Method In JQuery ? - GeeksforGeeks
-
How To Delay Jquery Animation - ITecNote