JQuery getScript Example

jquery

The jQuery getScript() method loads and executes the JavaScript file from remote location using HTTP GET request, then execute it. It is often called as shorthand method for inserting JavaScript into the web page. The main advantage of using getScript is that, it loads content on run time which better than including <script> tag in […]

JQuery ajaxSetup Example

jquery

The jQuery ajaxSetup method helps default values to set for future ajax requests. It uses an array of new settings; the default settings can be set globally. It also allows us to define globally shared properties for all the ajax requests within a single page and offers to set up default data objects to be […]

JQuery getJSON Example

jquery

JSON stands for JavaScript Object Notation which is lightweight data interchange format used to exchange text information. The jQuery getJSON() method access the data of JSON from the remote location by using GET HTTP request and also used to transfer and storing the data independently. It contains the URL to which request is sent to the server with […]

JQuery ajaxGet Example

jquery

DOM stands for Document Object Model which gives standards for accessing HTML elements and the attributes. These can be manipulated using Jquery ajaxGet() method. Using HTTP GET request data can be loaded from the server. When we access the server without reloading the web page, then we could pass the information for request to the […]

JQuery – How To Add Icon in the Dropdown List Box

jquery

This tutorial explains how to set icon in the drop down list box in jQuery. The following example shows setting icon for particular values in the drop down menu list. In this example, we are using two groups within select element. We could see that, we have set data (‘active’) to 0; it means that […]

How To Scroll a HTML Page Using JQuery Anchor Tag

jquery

This tutorial explains how to scroll HTML page to given anchor tag using jQuery. This section shows how to create a smooth page scrolling effect to scroll to the top or bottom of web page using jQuery. We will see two links in the following example. First link is called Go to Bottom at the […]

JQuery ajaxError Event Example

jquery

This tutorial explains the usage of ajaxError() method in jQuery. The ajaxError() is the jQuery Ajax event which specifies the function to be executed when Ajax requests fails to complete or completes with an error. This event is only called if an error occurred with the Ajax requests. We can never have both success and […]

JQuery slideToggle Example

jquery

This tutorial explains how to hide and show elements by using slideToggle() method in jQuery. The slideToggle() method display or hide the matched elements in the document. In this example, when we clicked Show/Hide button; it will show the collapsible content and hides the content, when we click the same button again. The slideToggle() method animates […]

How To Set Drop Down Value using JQUery

jquery

This tutorial explains how to set dropdown box value in jQuery. To display the selected drop down box value, we use following way. i.e. $(“#idName”).val();. To set particular value in the drop down box value, we use following way; $(“#idName”).val(“audi”);. The following example shows how to set drop down value, disabling and enabling of value […]

JQuery Text Selector Example

jquery

This tutorial explains usage of text selector in jQuery. The text selector selects only the text elements in the form. It selects all the <input type=”text”> elements in the document. The text selector is similar to $(‘[type=text]’) which returns text content of all matched elements. It is recommended that, it should start with colon (:) […]