#11 jQuery Callback Function | jQuery Chaining

preview_player
Показать описание
A callback function is executed after the current effect is finished.

We have seen the callback function in syntax of most of the jQuery methods we have done earlier like animate, slide, fade etc. but now we are going to actually use it practically.

Syntax :-
$(selector).hide(speed,callback);

Example :-
The example in video has a callback function that will be executed after the animate effect is completed.

Example without Callback :-
The example in video has no callback function, and the alert box will be displayed before the animate effect is completed.

jQuery Chaining :-
jQuery Chaining means Chain together or group together multiple jQuery methods within a single statement.

This way, browsers do not have to find the same element(s) more than once.

Example :-
$(document).ready(function(){
$("button").click(function(){
$("h1").animate({left: '250px'}).css("color", "green");
});
});

Join this channel to get access to perks:
Рекомендации по теме
Комментарии
Автор

i really appricate the way u explain sir..

blackrain
Автор

Thanks Amit for this, kindly do one for Ajax & React if you don't mind. Really appreciating all the knowledge you are sharing here. Be blessed. Finally i this the final episode on jQuery?

douglasmandela
Автор

Sir make projects with jQuery like slider, games, Quizzes, calculator, countdown, animations etc

MuhammadAdnan.
Автор

Please start appointmemt system with laravel

rajabhishek
visit shbcf.ru