JQuery Callback

By: Prof. Fazal Rehman Shamil
Last modified on June 3rd, 2020

JavaScript statements execute in a proper sequence. However, when we apply the effects like fade and animations etc, sometimes, the next line of the code can be run before the first effect is finished. This can leads to many kinds of problems. To prevent this problem, we need to create a callback function.

A callback function is a function that always executes after the current effect is finished.

Syntax of jQuery Callback Functions

$(selector).hide(speed,callback);

How to  Call back in jQuery?

Try it

Without Call back-Function in jQuery

Try it

Video Lecture

Prof. Fazal Rehman Shamil
Latest posts by Prof. Fazal Rehman Shamil (see all)