Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

jquery
communitycreator

What is ajaxStart() method in jQuery?

Shubham Singh Kshatriya

Overview

In jQuery, the ajaxStart() method is used to specify a function that runs when an AJAX request starts.

Syntax

$(document).ajaxStart(function());

Parameters

This method accepts only one parameter that is a function that gets invoked when the request starts.

Example

Console
Example of ajaxStart() method

Explanation

We click the “Get Product Data” button and make an AJAX request here to get product details. We do this between line 3 and line 19 in the “JavaScript” tab.

When the AJAX request starts, the ajaxStart() method will be invoked.

RELATED TAGS

jquery
communitycreator

CONTRIBUTOR

Shubham Singh Kshatriya
RELATED COURSES

View all Courses

Keep Exploring