How-to articles, tricks, and solutions about JQUERY

How to Get the Difference Between Two Arrays in JavaScript

Read this tutorial and learn several JavaScript and jQuery methods that help you get the difference between two arrays easily. Choose the best one for you.

How to Get the Height of an Element

In this tutorial, you can find out how to get the height of an element using jQuery. Use offsetHeight and clientHeight properties and different jQuery methods.

How to Get the ID of the Element that Fired an Event in jQuery

This tutorial provides you the method of getting the id of the element fired an event in jQuery. Read about the event.target property and this keyword.

How to Get the Value of a Textarea using jQuery

Read this tutorial and learn useful information about how you can detect the value of the HTML <textarea> element easily using one of the jQuery methods.

How to Get the Value of Selected Option in a Select Box

Read the tutorial and learn the methods of getting the value of the selected option in a select box using jQuery. Read about the text() and val() methods.

How to Hide and Show a <div>

Read this tutorial and learn several CSS, JavaScript and jQuery methods of hiding and showing the <div> element. Also, you can find examples and try them.

How to Manage a Redirect Request after a jQuery Ajax Call

In this JavaScript tutorial, you will read and learn detailed information about the method used for managing a redirect request after a jQuery Ajax call.

How to output the response HTML data by a jQuery AJAX request?

In a jQuery AJAX request, you can output the response HTML data using the .html() method.

How to pass php variable's value to jquery

You can pass a PHP variable's value to jQuery by using the PHP variable in a JavaScript script, and then accessing it with jQuery.

How to Remove All CSS Classes Using jQuery/JavaScript

In this tutorial, you can read and learn several easy and simple jQuery methods and pure JavaScript properties that are used to remove all CSS classes.

How to Remove Style Added with the .css() function Using jQuery

Read this tutorial and learn several ways of removing style added with the .css() function with the help of jQuery. Choose the best method for your case.

How to Reset File Input with jQuery

In this tutorial, you will read and learn useful information about the fastest method of resetting a file input by using some HTML and jQuery methods.

How to Select All Text in HTML Text Input When Clicked Using JavaScript

Read the tutorial and learn the two methods of selecting the entire text in HTML text input when clicked using JavaScript code snippets. Also, see examples.

How to Select and Manipulate CSS pseudo-elements using jQuery

Read this tutorial and learn the simplest and fastest way of selecting and manipulating the CSS pseudo elements using some jQuery and CSS methods.

How to Test If a Checkbox is Checked with jQuery

In this tutorial, you will find several jQuery methods that are used for testing whether the checkbox is checked based on the different versions you use.

How to Uncheck a Radio Button

Read this tutorial and learn useful information about the two jQuery and JavaScript solutions to unchecking a radio button, and choose the method you want.

How to Use jQuery Selectors on Custom Data Attributes

In this tutorial, you will find useful information about the usage of jQuery selectors on custom data attributes. See examples and solve your problem.

Laravel csrf token mismatch for ajax POST Request

The csrf_token error you are encountering occurs when you are making a POST request to your Laravel application and you have not included a valid CSRF token in the request.

PHP returning JSON to JQUERY AJAX CALL

To return JSON from a PHP script to a jQuery AJAX call, you can use the json_encode() function in PHP to convert an array or object into a JSON string.

Sending multiple data parameters with jQuery AJAX

To send multiple data parameters with jQuery's $.ajax() function in PHP, you can use the data option and set it to an object with the data you want to send.

Simple DatePicker-like Calendar

A simple DatePicker-like calendar can be created using the PHP DateTime class and some basic HTML and CSS.

submit a form in a new tab

To open a form submission in a new tab, you can use the target attribute of the form element and set it to _blank.

Submit html table data with via form (post)

Here is an example of how to submit an HTML table data via a form (using the POST method) using PHP:

1 2