Snippets tagged “jquery”
41 snippets use this tag.
- How do I PHP-unserialize a jQuery-serialized form?PHP
In PHP, you can use the unserialize function to unserialize a serialized string.
- How to Add and Remove Multiple or Single Select Options using jQueryJavaScript
Read this tutorial and learn how you can remove multiple options or a specific option in the select list using some interesting and useful jQuery methods.
- How to Add Options to a Select Element using jQueryJavaScript
Read this tutorial and find useful information about the multiple methods of adding options to a select element using jQuery. Choose the best one for you.
- How to Apply CSS Styles to Only the Half of a Word or Character?CSS
Learn how to make a word or character have half style or triple style. Use only CSS to get the effect, or do it with the help of JavaScript and jQuery.
- How to Auto-Hide a Placeholder Text on Focus with CSS and jQueryCSS
The placeholder attribute describes the expected value of an input field. See how to auto-hide placeholder text on focus using HTML, CSS, and jQuery.
- How to Center a <div> on the Screen Using jQueryJavaScript
Read the tutorial and learn the jQuery method of centering the <div> element on the screen. Get a code snippet to add your script for centering the element.
- How to Change an Element’s Class with JavaScriptJavaScript
One of the most common issues in JavaScript is changing an element’s class. In this snippet, we are going to show you the efficient ways of achieving it.
- How to Change Selected Value of a Drop-Down List Using jQueryJavaScript
In this tutorial, you will read and learn about jQuery methods that are used to change the selected value of a drop-down list via its text description.
- How to Change the Href for a Hyperlink using jQueryJavaScript
Read this JavaScript tutorial and learn the easy way of changing the href attribute for a hyperlink step by step by using one of the methods of jQuery.
- How to Change the Image Source Using jQueryJavaScript
Read this tutorial which will provide you with useful information about the best and easy method that can be used to change the image source using jQuery.
- How to Check a Radio Button with jQueryJavaScript
Read the tutorial and learn the right way of checking a radio button with jQuery. Also, read how to handle with different versions of jQuery while checking.
- How to Check and Uncheck Checkbox with JavaScript and jQueryJavaScript
In this tutorial, you will read and learn about several JavaScript and jQuery methods for checking and unchecking a checkbox. Choose the best one for you.
- How to Check if an Enter Key is Pressed with jQueryJavaScript
Read this tutorial and learn the right method of detecting whether the user pressed the Enter key. The given method provides a cross browser compatibility.
- How to Check if User Has Scrolled to the Bottom of the PageJavaScript
Read this tutorial and learn information about jQuery method that is run for checking whether the user has scrolled to the bottom of the page or near to it.
- How to Create a jQuery Ajax Post with PHPPHP
Here, we will share with you how to create a jQuery Ajax post request with PHP. Just check out the examples and choose the one that suits your needs best.
- How to Create Ajax Submit Form Using jQueryJavaScript
This tutorial provides several methods of creating an Ajax submit form using jQuery easily. Read about the differences of the GET and POST HTTP methods.
- How to Create Range Slider With HTML5 and jQueryJavaScript
HTML5 range input type allows creating range sliders. Read the tutorial and learn a simple solution including a jQuery code to achieve the desired result!
- How to Create Smooth Scrolling When Clicking an Anchor LinkJavaScript
Read the tutorial and learn information about the two jQuery and JavaScript solutions that are used to create smooth scrolling when clicking an anchor link.
- How to Detect Escape Key Press Using jQueryJavaScript
Read this tutorial and learn the two methods of detecting an escape key press using jQuery. Read about keyup and keydown event handler and see examples.
- How to Disable Text Selection, Copy, Cut, Paste and Right-click on a Web PageJavaScript
Learn the ways of how to disable text selection highlighting, how to disable copy, cut and paste, how to disable right-click. See example with CSS, JavaScript and jQuery.
- How to Disable the Browser Autocomplete and Autofill on HTML Form and Input FieldsHTML
Learn how to prevent browsers auto filling the input fields of HTML forms. Use autocomplete="off" to specify that autocomplete is disabled. See examples.
- How to Get Query String Values in JavaScriptJavaScript
On this page, you can find fast and simple solutions on how to get query string values in JavaScript. Just follow the examples given below to make it work.
- How to Get the Children of the $(this) SelectorJavaScript
Getting the children of the $(this) selector is one of the common issues in modern JavaScript. Find the most proper answer to the problem in this snippet.
- How to Get the data-id AttributeJavaScript
Read this tutorial and learn the right ways of getting the data-id attribute using jQuery two methods. Also, learn more information about the two methods.
- How to Get the Difference Between Two Arrays in JavaScriptJavaScript
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 ElementCSS
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 jQueryJavaScript
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 jQueryJavaScript
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 BoxJavaScript
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>JavaScript
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 Include a JavaScript File in Another JavaScript FileJavaScript
Read the tutorial and find out different approaches to including a JavaScript file in another JavaScript file. Also, find a brief representation of methods.
- How to Manage a Redirect Request after a jQuery Ajax CallJavaScript
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 pass php variable's value to jqueryPHP
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/JavaScriptJavaScript
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 Reset File Input with jQueryJavaScript
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 Set the Size of the <textarea> ElementHTML
In this tutorial, you will find two ways of setting the size of the HTML <textarea> element. For that purpose, you can use HTML attributes or CSS properties.
- How to Uncheck a Radio ButtonJavaScript
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 Validate an E-mail Using JavaScriptJavaScript
Read this tutorial and learn a fast and easy solution to the issue of validating an email using JavaScript. Also, you will read about what the email is.
- Laravel csrf token mismatch for ajax POST RequestPHP
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 CALLPHP
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.
- Waiting Until All jQuery Ajax Requests are DoneJavaScript
Read this tutorial and learn useful information about the jQuery function that waits and then executes the function when all the ajax requests resolve.