jQuery change()

The jQuery change() method is used to attach a function to run when a change event occurs i.e, when the value of an element is changed. This method is limited for form fields only, for input elements, textarea boxes and select elements. The change event is fired immediately in case of select boxes, checkboxes, and … Read more

jQuery focus()

The jQuery focus event is implicitly used for a limited set of elements like input, select, a href, etc. As the name suggests, this event occurs when an element gains focus. Syntax: To trigger the focus event for selected elements. $(selector).focus() To add a function to the focus event. $(selector).focus(function) Function: It is an optional … Read more

jQuery blur()

The jQuery blur() event triggers the blur (element loses focus) event. Syntax: To trigger the blur event. $(selector).blur() To add a function to the blur event. $(selector).blur(function) Function: It is an optional parameter that is used to specify the function to run after the event occurs. Example1: <!DOCTYPE html> <html> head> <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> <script> $(document).ready(function(){ … Read more

jQuery bind()

The jQuery bind() event attaches one or more event handlers of the selected elements and executes a specified function when the event occurs. Syntax: $(selector).bind(event,data,function,map) Event: It is a compulsory parameter as it specifies the events to attach. Data: It is an optional parameter that is used to specify any additional data. Function: It is … Read more

jQuery click()

The jQuery click () method is executed once the click event occurs. Syntax: To trigger the click event for the selected elements. $(selector).click() To attach a function to the click event. Example1: <!DOCTYPE html> <html> <head> <script src=”https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js”></script> <script> $(document).ready(function(){ $(“h1,h2”).click(function(){ $(this).hide(); }); }); </script> </head> <body> <h1>Click me. I am a ghost.</h1> <h2>Me too.</h2> … Read more

jQuery Events Tutorial

jQuery events are the web-detected actions. jQuery provides a number of event-related methods. These methods are used to create dynamic web pages. METHODS DESCRIPTION click Attaches/Triggers the click event dblclick Attaches/Triggers the double-click event mouseenter Attaches/Triggers the mouseenter event mouseleave Attaches/Triggers the mouseleave event keyup Attaches/Triggers the keyup event keydown Attaches/Triggers the keydown event keypress … Read more

jQuery serializeArray()

Some important features of the jQuery serializeArray() method are: jQuery serializeArray() method creates a JavaScript array of objects. One can select one or more form elements, as it operates on a jQuery collection of forms and form controls. It serializes the form values. Syntax: $ (selector).serializeArray() Example1: <!DOCTYPE html> <html> <head> <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> <script> $(document).ready(function(){ … Read more

jQuery serialize()

Some important features of the jQuery serialize() method are; jQuery serialize() method creates a text string in standard URL-encoded notation. It is used in form controls. It serializes the form values, the serialized values can then be used in the URL query string. Syntax: $ (selector).serialize() Example: <!DOCTYPE html> <html> <head> <script src=”https://code.jquery.com/jquery-1.10.2.js”></script> <script> $(document).ready(function(){ … Read more

jQuery Form

jQuery form is a part of jQuery AJAX methods. AJAX (Asynchronous JavaScript and XML) can be defined as the art of exchanging data with a server which includes loading data in the background and updating only the specific parts of a web page, without reloading the whole page. With AJAX functionality, jQuery provides several methods … Read more