- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 10710 Articles for Web Development
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
453 Views
jQuery is a feature-rich JavaScript library. We can perform a lot of actions with the help of jQuery which would otherwise require writing large pieces of code. It makes DOM manipulation, event handling, animation, ajax, etc. very easy.In this tutorial, we will learn how to register a handler to be called when the first Ajax request begins using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxStart() function of jQuery. This function is always ... Read More
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
328 Views
In this tutorial, we will learn how to register a handler to be called when all Ajax requests are completed using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ,ajaxStop() function of jQuery.SyntaxUse the following syntax to register a handler after an ajax request −$(document).ajaxStop(function () { console.log('Registered handler.') })Explanation − Suppose we have a GET request on an API. When the API returns a result, jQuery checks if any requests are pending ... Read More
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
886 Views
In this tutorial, we will learn how to register a handler to be called when Ajax requests complete using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxComplete() function of jQuery. This function is always triggered when the request is completed.SyntaxUse the following syntax to register a handler after every ajax request −$(document).ajaxComplete(function () { console.log('Registered handler.') })Explanation − Suppose we have a GET request on an API. When the API returns a ... Read More
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
118 Views
In this tutorial, we will learn how to check the lock-state of a callback list using jQuery. The lock is a callback list in jQuery in the current state. We can toggle the lock state so that additional changes cannot be made unless required.SyntaxThe callbacks list is locked and checked as follows −// Get callbacks list at current state var callbacks = $.Callbacks() // Lock the callbacks list callbacks.lock() // Check callbacks is locked or not console.log(callbacks.locked())AlgorithmFirst we receive the callbacks list at the current state using the Callbacks() function.Then we lock it using the lock() function and ... Read More
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
1K+ Views
In this tutorial, we will learn How to attach a function to be executed before an Ajax request is sent using jQuery. Ajax requests are typically HTTP requests that are called by the browser for different tasks such as GET, POST, etc. So when the tasks are performed, we can register a handler using the ajaxSend() function of jQuery. This event is called by jQuery whenever an ajax request is to be made.SyntaxUse the following syntax to register a handler before an ajax request −$(document).ajaxSend(function () { console.log('Triggered ajaxStart. Started Request') })We have an Ajax request. Before sending the ... Read More
![Manav Sarkar](https://www.tutorialspoint.com/assets/profiles/487933/profile/60_1959908-1657865865.jpg)
192 Views
jQuery is a feature-rich JavaScript library. We can perform a lot of actions with the help of jQuery which would otherwise require writing large pieces of code. It makes DOM manipulation, event handling, animation, ajax, etc. very easy.In this tutorial, we will learn to add the previous set of elements on the stack to the current set. jQuery maintains an internal stack of the changes that are performed to the matched stack. When the DOM traversal functions or methods are called, the new elements are pushed into the stack. So to use previous stack elements, the addBack() method is called.SyntaxWe ... Read More
![Imran Alam](https://www.tutorialspoint.com/assets/profiles/477694/profile/60_3212913-1655890638.jpeg)
2K+ Views
We could apply String split(), Array sort() and Array join() methods to write a function that returns a passed string with letters in alphabetical order in JavaScript. A JavaScript function is a block of code that is executed when it is invoked. A string is a sequence of characters. In JavaScript, strings are represented by the type String.Input string : tutorialspoint Output string: aiilnooprstttuStepsSplit the string into an array of characters using split() method.Apply the sort() method to sort the characters in alphabetical order.Finally, we use the join() method to join the characters back into a string.The Array.sort() method sorts the ... Read More
![Imran Alam](https://www.tutorialspoint.com/assets/profiles/477694/profile/60_3212913-1655890638.jpeg)
27K+ Views
In JavaScript, there are different ways to convert an array of strings to an array of numbers. The first way is to use the built-in parseInt() method, and the second way is to use a type conversion function, and the third one is to use the unary + operator.Using the parseInt() methodThe parseInt() method is a built-in function in JavaScript that takes a string as an argument and returns a number. This method can be used to convert an array of strings to an array of numbers.SyntaxThe syntax of the parseInt() method is as follows −parseInt(string, radix);ParametersString − The string ... Read More
![Imran Alam](https://www.tutorialspoint.com/assets/profiles/477694/profile/60_3212913-1655890638.jpeg)
2K+ Views
JavaScript provides two functions for dealing with encoded strings: escape() and unescape(). The escape() function is used to encode a string, making it safe for use in a URL. The unescape() function is used to decode an encoded string.The differencesThe main difference between the two functions is that escape() encodes characters that are not ASCII, while unescape() only decodes those characters. This means that if you use escape() on a string that only contains ASCII characters, the result will be the same as the input string. However, if you use unescape() on a string that contains non-ASCII characters, the result ... Read More
![Imran Alam](https://www.tutorialspoint.com/assets/profiles/477694/profile/60_3212913-1655890638.jpeg)
6K+ Views
In JavaScript, there are two main ways that a variable can be "undefined". The first is when you declare a variable without giving it a value. The second is when you try to access a variable that does not exist.Undefined in JavaScript When a variable is declared without a value, it is automatically given the value of "undefined". This can happen if you forget to assign a value to a variable, or if you intentionally do not assign a value (For example, if you are waiting for user input).If you try to access a variable that does not exist, you will ... Read More