Home » JavaScript » jQuery (page 4)

jQuery

jQuery Http Get / Post Example

The aim of this example is to present and use the jQuery Http Get and Post methods. The jQuery get() and post() methods are used to request data from the server with an HTTP GET or POST request. These are the two commonly used methods for a request-response between a client and server. GET requests data from a specified resource ...

Read More »

jQuery Enable/Disable Example

The aim of this example is to show you how to enable/disable the html elements by using jQuery. In some cases, we need to enable or disable a HTML element. This will help us to allow/prevent the user from doing some actions. jQuery provides very simple code to enable/disable any HTML element. The following code is used respectively for this ...

Read More »

jQuery Next Example

The aim of this example is to show you how to use the jQuery next() method. The jQuery next() method is used for getting the next element of any HTML element. This method takes the wanted elements type as an optional argument. For example, next('span') is used to get the immediate following ‘span’ element. By using this method, only the ...

Read More »

81 jQuery Interview Questions and Answers – The ULTIMATE List

Without a doubt, jQuery has given a much needed boost to JavaScript, a language so useful but equally underrated at times. Before jQuery came into the picture, we used to write lengthy JavaScript code not just for bigger but even for smaller functionality. That code was at times both difficult to read and maintain. Having written JavaScript before using this ...

Read More »

jQuery Get Example

The aim of this example is to show you how to use the jQuery .get() method. The jQuery .get() method is used to load data from the server using a HTTP GET request. The signature of this method is like jQuery.get(url [,data][,success][,dataType ]) where only the url is mandatory. Some methods as .done(), .fail(), and .always() can be chained to ...

Read More »

JQuery Settimeout Example

The aim of this example is to show you how to use the jQuery setTimeout() method. Sometimes we need to execute a javascript code after some seconds, the jQuery setTimeout() method can be used for this purpose. This method takes two parameters: The first is the javascript that need to be executed. The second is the delay time in milliseconds. ...

Read More »

jQuery Trim Example

The aim of this example is to show you how to use the jQuery .trim() method. Sometimes we need to remove the whitespace (newlines, spaces and tabs) from the beginning and the end of a string. For this purpose we can use jQuery .trim() method. If these whitespace characters occur in the middle of the string, they are preserved. Let’s ...

Read More »

jQuery getJSON example

The goal of this example is to show you how to use the jQuery .getJSON() method. The JavaScript Object Notation (JSON) is a data interchanging format. JSON is a set of key/value pairs, the value may be a string, boolean, number, object or an array. As an example look at this personal information in json format: {"name":"maykel","age":25}. To get the ...

Read More »

jQuery clone example

The aim of this example is to show you how to use the jQuery .clone() method . Sometimes we need to copy the HTML element and work with the copied element. The jQuery .clone() method is used for this purpose. This method performs a deep copy of the set of matched elements, meaning that it copies the matched elements as ...

Read More »