- Data Structure
- Networking
- RDBMS
- Operating System
- Java
- MS Excel
- iOS
- HTML
- CSS
- Android
- Python
- C Programming
- C++
- C#
- MongoDB
- MySQL
- Javascript
- PHP
- Physics
- Chemistry
- Biology
- Mathematics
- English
- Economics
- Psychology
- Social Studies
- Fashion Studies
- Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Amit D has Published 118 Articles
Amit D
10K+ Views
To change the text color with jQuery, use the jQuery css() method. The color css property is used to change text color.ExampleYou can try to run the following code to learn how to change text color with jQuery −Live Demo $(document).ready(function(){ $("p").on({ ... Read More
Amit D
2K+ Views
You cannot return variable value from jQuery event function. To understand the reason, let us see how data is passed, which was created in the event handler of a button click.ExampleLive Demo $(document).ready(function(){ var a=document.getElementById('demo'); a.addEventListener('click', function(){ var s='Hello ... Read More
Amit D
465 Views
Returning false from jQuery event handlers is like calling both preventDefault() and stopPropagation(). The preventDefault() method prevents the browser from executing the default action.ExampleYou can try to run the following code to run event.preventDefault() method in jQuery −Live Demo jQuery preventDefault() method ... Read More
Amit D
1K+ Views
To prevent jQuery events from bubbling up to parent elements, use the stopPropogation() method. The stopPropagation() method stops the bubbling of an event to parent elements, preventing any parent handlers from being notified of the event.ExampleYou can try to run the following code to prevent jQuery events from bubbling up ... Read More
Amit D
186 Views
To stop the bubbling of an event to parent elements, use the stopPropagation() method. You can try to run the following code to learn how to stop the bubbling of an event to parent elements −ExampleLive Demo jQuery stopPropagation() method ... Read More
Amit D
641 Views
To prevent the browser from executing the default action in jQuery, use the preventDefault() method. The preventDefault() method prevents the browser from executing the default action.ExampleYou can use the method isDefaultPrevented() to know whether this method was ever called (on that event object).Live Demo ... Read More
Amit D
2K+ Views
To remove all elements except the first one, use the remove() method with the slice() method in jQuery. You can try to run the following code to remove all elements except for first one using jQuery −ExampleLive Demo $(document).ready(function(){ $(".button1").click(function(){ ... Read More
Amit D
4K+ Views
To remove all child nodes from a parent, use the empty() method. The empty() method removes all child nodes from the set of matched elements.ExampleYou can try to run the following code to learn how to remove all child nodes from a parent −Live Demo ... Read More
Amit D
94 Views
The insertAfter( selector ) method inserts all of the matched elements after another, specified, set of elements.Here is the description of all the parameters used by this method −selector − Content after which the selected element(s) is inserted.ExampleYou can try to run the following code to learn how to use jQuery.insertAfter() ... Read More
Amit D
215 Views
The insertBefore( selector ) method inserts all of the matched elements before another, specified, set of elements. Here is the description of all the parameters used by this method −selector − Content before which the selected element(s) is inserted.ExampleYou can try to run the following code to learn how to use ... Read More