Last active
October 27, 2022 21:52
-
-
Save tevashov/5172442 to your computer and use it in GitHub Desktop.
How to use callbacks in jQuery #jQuery
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function runAlertNow () { | |
| $(this).html('I just ran this function!'); | |
| } | |
| // both of these lines do the same thing | |
| $('#test').slideUp(400, runAlertNow); | |
| $('#test').slideUp(400, function () | |
| { | |
| $(this).html('I just ran the anonymous function!'); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment