Category: JQuery

The switchClass and toggleClass are jQuery methods that are used to swap classes from the element.

You can use these methods to change of state of the element according to the condition, toggling classes within the elements or maybe in some other cases.

In this tutorial, I am creating various examples to explain both methods.

How to use switchClass and toggleClass in jQuery

Javascript JQuery

The check and uncheck all functionality basically is seen where the large list of records are available. This small feature makes little easier for the users to perform an action.

It is very useful when need to perform the same operation on all records instead of specific record.

You may have seen this in Gmail, WordPress Admin dashboard.

In this tutorial, I show how you can implement this functionality with jQuery and JavaScript.

How to Check and uncheck all using jQuery and JavaScript

How To Javascript JQuery

It gives more flexibility to the user by allowing them to hide and show those columns which they don’t want to see on the list.

You can do this with jQuery by toggling the specific columns according to the selection.

In the demonstration, I am creating a table layout for listing the employee details and use check boxes to hide and show the table columns using jQuery.

How to Hide and Show the Table column using jQuery

JQuery PHP

JQuery PHP

An Array is used to store multiple values in a single variable.

This can be used to pass the group of related values as data to the $.ajax for processing and get the response.

E.g. pass all checked checkboxes values, selected values from the list.

In this tutorial, I show how you can pass JavaScript Array to an AJAX request with an example.

How to Send JavaScript Array to the AJAX using jQuery and PHP

AJAX JQuery PHP

JSON stands for JavaScript Object Notation, it is a data interchange format which is also been used to passing data from the server.

It is the best and effective way when need to return multiple values as a response from the PHP script to the jQuery.

You couldn’t directly return an array from AJAX, it must have converted in the valid format.

In this case, you can either use XML or JSON format.

In the tutorial demonstration, I will return an array of users from AJAX, while return converts the array into JSON format using the json_encode() function in the PHP.

On the basis of response show data in tabular format.

Return JSON response from AJAX using jQuery and PHP

AJAX DataBase JQuery PHP

You can use single load more button on your webpage to paginate the list of records.

This type of pagination is very common on the website or in mobile apps.

The user needs to click on the load more button whenever the need to view more items.

After the click, the data will append with the existing list items.

In this tutorial, I am creating the similar type of functionality using jQuery and AJAX.

Load more results with jQuery,AJAX, and PHP

AJAX JQuery PHP