/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
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!'); });