AJAX is an acronym standing for Asynchronous JavaScript and XML that is the art of exchanging data with a server without a browser page refresh. jQuery is a great tool that provides a set of AJAX methods to develop the next generation of web application. This jQuery method is mostly used for requests where the […]
Category: jQuery
jQuery in Namaste UI focused on jquery function, jquery online course, jquery book, html css javascript and jquery, jquery online link, jquery tutorial and jquery reference.
jQuery live() Method

The jQuery live method attach one or more event handlers for all elements which match the current selector and specifies a function to run when the events occur. Event handlers attached using live() method works for both current and future elements which match the selector. Syntax of jQuery live(): $(selector).live(event, data, function) Note: The jQuery […]
Why use jQuery on() instead of click()

The on() method attaches one or more event handler functions for one or more events to the selected elements. Event handlers attached using the jQuery on() method will work for both current and future elements i.e. dynamic element created by a script. Note: As of jQuery version 1.7, the jQuery on() method is the new […]

The serialize() method creates a text string in standard URL-encoded notation by serializing form values. One or more form elements (input, radio, checkbox etc.) can be used as a serializing. You can use this serialized values as a URL query string while making an AJAX request. Syntax: $(selector).serialize() Below we have shown an example for […]
jQuery Data Method

jQuery data method gives you the ability to associate arbitrary data with HTML DOM nodes and JavaScript objects. As of jQuery 1.4.3, you have the ability to use this method on JavaScript objects and call for element modification. jQuery.data() method store arbitrary data associated with the specified element or returns the value that was set. […]

jQuery bind() function is used to attach one or more event handler to elements, while the unbind() is used to removes an existing event handler from elements. As of jQuery version 1.7, jQuery on() method is the preferred method rather than jquery bind and unbind for attaching event handlers for selected elements. bind() : A basic […]

Using jQuery closest and parents, you can set or get the first or all ancestor element that matches the selector and traversing up through its ancestors in the DOM tree. The ancestor may be a parent, grandparent, great grandparent, and so on. For example: $(“div”).closest(“p”).css({“color”: “red”}); If it doesn’t match the selector, then it will […]
jQuery scroll to element

Sometimes it is required in our website to move the page scroll to any jQuery/DOM element position for a reason like clicking on anchor move the scroll to div element. Here’s how you can programmatically scroll to any element on the top of the page. If you’re using jQuery then, you don’t need any plugin. […]

Using delegate and undelegate in jQuery, you can bind or remove a handler from the event for all elements that matches the current selector. Basically, these methods achieve the same thing as the jQuery .live() and .die() methods but they just use a different syntax. Syntax of Delegate: $(selector).delegate(childSelector,event,data,function) Example of jQuery Delegate: $(“table”).delegate(“td”, “hover”, […]

Autosize is a small jQuery plugin that allow textarea autosize making height dynamically so that it expands as based on visitor input. You can implement textarea autosize by calling the .autosize() method on any textarea element. Example of textarea autosize: $(‘textarea’).autosize(); For implementation autosize in your website you need to follow below steps: Include jQuery […]