How to Hide and Show the Table column using 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 checkboxes to hide and show the table columns using jQuery.

How to Hide and Show the Table column using jQuery

Read more

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

The process of sending JavaScript arrays to the server-side using AJAX is a frequent requirement in web development. JavaScript arrays allow us to store and manage data in a structured format.

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, you will learn how to send a JavaScript array to the server-side using AJAX, jQuery, and PHP with a live example.

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

Read more

Return JSON response from AJAX using jQuery and PHP

JSON or JavaScript Object Notation is a widely used transmitting format for passing data between a server and a web application. It is the most efficient way to return multiple values as a response from the PHP script to jQuery.

It is not possible to return an array directly from AJAX, and it must be converted into a valid format. You can either use the 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

Read more

Load more results with jQuery AJAX and PHP

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

This type of pagination is very common on websites or in mobile apps. The user must click on the load more button whenever they need to view more items.

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

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

Load more results with jQuery,AJAX, and PHP

Read more