- Trending Categories
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
Found 766 Articles for JQuery
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
253 Views
jQuery on() methodThe on( events [, selector ] [, data ], handler ) method binds a handler to an event (like click) for all current − and future − matched element. It can also bind custom events.Here is the description of all the parameters used by this method −events − Event types separated by spaces.selector − A Selector Stringdata − Data to be passed to the event handler in event.datahandler − A function to bind to the event on each of the set of matched elementsExampleYou can try to run the following code to learn how to work with on() method − ... Read More
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
487 Views
To disable a particular jQuery event, use the jQuery off() method. You can try to run the following code to learn how to disable a particular jQuery event on a page −ExampleLive Demo $(document).ready(function(){ $("p").on("click", function(){ alert("You clicked it!"); }); $("button").click(function(){ $("p").off("click"); }); }); Click me Click above to generate an alert box. Click the below button to remove namespace, which won’t generate an alert box. Remove Event
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
6K+ Views
To submit a form using jQuery click event, you need to detect the submit event. Let’s submit a form using click event and without using click event.ExampleYou can try to run the following code to learn how to submit a form using jQuery click event −Live Demo $(document).ready(function(){ $(function() { $('#submit1').click(function(e) { e.preventDefault(); $("#Demo").submit(); }); $('#submit2').click(function(e) { e.preventDefault(); $("#Demo").submit(); }); }); }); Team Submit
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
5K+ Views
To set the background color using jQuery, use the jQuery css() property. We will set background color on mouse hover with the jQuery on() method.ExampleYou can try to run the following color to set background color in jQuery.Live Demo $(document).ready(function(){ $("body").on({ mouseenter: function(){ $(this).css("background-color", "gray"); }, }); }); Move the mouse pointer on the page to change the background color.
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
9K+ Views
To change the background color using jQuery, use the jQuery css() property. We will change background color on mouse hover with the jQuery on() and css() method. ExampleYou can try to run the following code to learn how to change background color using jQuery:Live Demo $(document).ready(function(){ $("body").on({ mouseenter: function(){ $(this).css("background-color", "gray"); }, mouseleave: function(){ $(this).css("background-color", "red"); }, dblclick: function(){ $(this).css("background-color", "yellow"); } }); }); Double click and move the mouse pointer to change the background color.
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
572 Views
To remove underline from text hyperlink on hover using jQuery, use the jQuery css() property. The color text-decoration property is used with value none.ExampleYou can try to run the following code to learn how to remove underline from text hyperlink:Live Demo jQuery Text Decoration $(document).ready(function() { $('a').hover( function () { $(this).css({"text-decoration":"none"}); }); }); a { text-decoration: underline; } Demo text
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
468 Views
To underline a hyperlink on hover using jQuery, use the jQuery css() property. The color text-decoration property is used.ExampleYou can try to run the following code to learn how to underline a hyperlink on hover:Live Demo jQuery Hyperlink Decoration $(document).ready(function() { $('a').hover( function () { $(this).css({"text-decoration":"underline"}); }); }); a { text-decoration: none; } Demo text
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
660 Views
To change text decoration property with jQuery, use the jQuery css() property.ExampleYou can try to run the following code to change text-decoration property from underline to overline:Live Demo $(document).ready(function(){ $("p").on({ mouseenter: function(){ $(this).css({"text-decoration": "overline"}); } }); }); p { text-decoration: underline; } Move the mouse pointer on the text to remove underline and add overline.
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
388 Views
To remove underline from a text in jQuery, use the jQuery css() method. The css property text-decoration property is used with none value.ExampleYou can try to run the following code to remove underline:Live Demo $(document).ready(function(){ $("p").on({ mouseenter: function(){ $(this).css({"text-decoration": "none"}); } }); }); p { text-decoration: underline; } Move the mouse pointer on the text to remove underline.
![Amit D](https://www.tutorialspoint.com/assets/profiles/13349/profile/60_63530-1512538715.jpg)
3K+ Views
To make text bold, italic and underline using jQuery, use the jQuery css() method with the CSS properties font-style, font-weight and text-decoration. You can try to run the following code to learn how to make text bold, italic and underline using jQuery −ExampleLive Demo $(document).ready(function(){ $("p").on({ mouseenter: function(){ $(this).css({"font-style": "italic", "font-weight": "bold","text-decoration": "underline"}); } }); }); Move the mouse pointer on the text to make text bold, italic and underline.