Weve added an input to take the amount were putting into the swear jar. The class is added by using the jQuery addClass () method. The load event occurs when a specified element has been loaded. In this example, I am sending a GET request. The first parameter mentioned the URL of the data to be deleted then used the success() callback function on the XMLHttpRequest object( return object of the ajax() function) to display the notification message on the success of the delete request Use .on("load", handler) instead of .load(handler) and .trigger("load") instead of .load().. This is done for performance reasons. In this example, we are including the URL parameter and the optional type parameter. If you are passing a a lot of data (complex object), It might be a good idea to convert your action method to a HttpPost action method and use jQuery post to post data to that. The jQuery.ajax() method no longer strips off the hash in the URL if it is provided, and sends the full URL to the transport (xhr, script, jsonp, or custom transport). For remote data sources only, Select2 does not create a new