

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What are the methods used to provide effects in jQuery?
jQuery effect methods are used to create custom animation effects. The following are some of the methods used to provide effects in jQuery −
S.No | Method | Description |
1 | animate() | Custom animation on the selected elements |
2 | clearQueue() | To remove remaining queued functions from the selected elements |
3 | delay() | To set a delay for all queued functions on the selected elements |
4 | dequeue() | To remove the next function from the queue, and then executes the function |
5 | fadeIn() | Fades in the selected elements |
6 | fadeOut() | Fades out the selected elements |
7 | fadeTo() | Fades in/out the selected elements to a given opacity |
8 | fadeToggle() | To Toggle between the fadeIn() and fadeOut() methods |
9 | finish() | To stop, remove and complete all queued animations for the selected elements |
Let’s see an example to work with jQuery method animate(), which animates any element.
You can try to run the following code to learn how to use the jQuery method to animate() to animate a button −
Example
<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function(){ $("#button1").click(function(){ $("#shape").animate({width: "300px"}); }); $("#button2").click(function(){ $("#shape").animate({width: "150px"}); }); }); </script> </head> <body> <button id="button1">Increase width</button> <button id="button2">Original width</button> <div id="shape" style="background:rgb(73,159,255);height:150px;width:150px;margin:30px;"></div> </body> </html>
- Related Questions & Answers
- What are the options for jQuery Animated Effects?
- What are jQuery string methods?
- What are the methods in jQuery to manipulate attributes?
- What are Event Methods in jQuery?
- What are jQuery Event Helper Methods?
- What are the Effects of Cyberwarfare?
- How to determine if jQuery effects are still executing?
- What are the commonly used methods to auto-generate the .gitignore file?
- What are the effects of Share Buyback?
- What are native methods in Java and where are they used?
- How to increase the duration of jQuery effects?
- What is the difference between jQuery add() & jQuery append() methods in jQuery?
- What are the effects of issuing Bonus shares?
- What are some of the commonly used methods of the array class in C#?
- What is the difference between Ajax and jQuery-Ajax methods in jQuery?
Advertisements