Amit D has Published 121 Articles

How to use POST method to send data in jQuery Ajax?

Amit D

Amit D

Updated on 15-Jun-2020 08:52:44

The jQuery.post( url, [data], [callback], [type] ) method loads a page from the server using a POST HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs or the ... Read More

What is jQuery.ajaxSetup() method in jQuery?

Amit D

Amit D

Updated on 15-Jun-2020 08:50:16

The jQuery.ajaxSetup() method sets global settings for future AJAX requests. Here is the description of all the parameters used by this method-Let’s say we have the following HTML content in result.html file, THIS IS RESULT...The following is an example showing the usage of this method. Here we make use of ... Read More

What are jQuery events .load(), .ready(), .unload()?

Amit D

Amit D

Updated on 15-Jun-2020 07:36:05

jQuery load() methodThe load() method is used to attach event handler to load event.ExampleYou can try to run the following code to learn how to work with jQuery load() method.Note:  The method deprecated in jQuery 1.8. It got finally removed in jQuery 3.0. To run the following code, add jQuery ... Read More

How to use jQuery.wrapAll() to wrap multiple elements?

Amit D

Amit D

Updated on 13-Jun-2020 14:41:16

To wrap multiple elements in jQuery, use the wrapAll() method. The wrapAll( ) method wraps all the elements in the matched set into a single wrapper element.Here is the description of all the parameters used by this method:html − A string of HTML that will be created on the fly and ... Read More

How to use wildcards like $ ('#name*'), $ ('#name%') in jQuery selectors?

Amit D

Amit D

Updated on 13-Jun-2020 12:27:36

For getting the id that begins or ends with a particular string in jQuery selectors, you shouldn’t use the wildcards $('#name*'), $('#name%'). Instead use the characters ^and $. The ^ is used is used to get all elements starting with a particular string. The $ is used is used to ... Read More

How to use multiple versions of jQuery on the same page?

Amit D

Amit D

Updated on 12-Jun-2020 08:58:44

Yes, you can use multiple versions of jQuery on the same page. To avoid any kind of conflict, use the jQuery.noConflict() method. jQuery.noConflict() method allows you to use multiple frameworks, while using jQuery. Other JavaScript frameworks include Ember, Angular, Backbone, etc.The $ sign is used for jQuery, but what if ... Read More

How to use multiple JavaScript libraries along with jQuery?

Amit D

Amit D

Updated on 12-Jun-2020 08:56:18

jQuery.noConflict() method allows you to use multiple frameworks, while using jQuery. Other JavaScript frameworks include Ember, Angular, Backbone, etc.The $ sign is used for jQuery, but what if other frameworks also use the same $ sign; this may create issues and conflict. To avoid this, jQuery issued the noConflict() method. ... Read More

How to create a custom jQuery Plugin?

Amit D

Amit D

Updated on 12-Jun-2020 08:54:35

To create a jQuery plugin, firstly create a file named jquery-myplugin.js with the following code. This is our plugin code. Here, myplugin is the name of our plugin.(function ( $ ) {    $.fn.myplugin = function( options ) {       var web = $.extend({          name: ... Read More

How to call a function inside a jQuery plugin from outside?

Amit D

Amit D

Updated on 12-Jun-2020 07:19:19

To call a function inside a jQuery plugin from outside, try to run the following code. The code updates the name with jQuery as an example using properties:Live Demo                          $.fn.person = function(prop) {       ... Read More

How to use GET method to send data in jQuery Ajax?

Amit D

Amit D

Updated on 17-Feb-2020 07:35:37

The jQuery.get( url, [data], [callback], [type] ) method loads data from the server using a GET HTTP request.Here is the description of all the parameters used by this method −url − A string containing the URL to which the request is sentdata − This optional parameter represents key/value pairs that will be ... Read More

1 2 3 4 5 ... 13 Next
Advertisements