<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>callback-function on Curtis Timson</title><link>https://hugo.curtiscode.dev/tags/callback-function/</link><description>Recent content in callback-function on Curtis Timson</description><generator>Hugo -- gohugo.io</generator><language>en-GB</language><lastBuildDate>Sun, 05 Aug 2012 00:00:00 +0000</lastBuildDate><atom:link href="https://hugo.curtiscode.dev/tags/callback-function/index.xml" rel="self" type="application/rss+xml"/><item><title>Using jQuery callback functions</title><link>https://hugo.curtiscode.dev/post/jquery/using-jquery-callback-functions/</link><pubDate>Sun, 05 Aug 2012 00:00:00 +0000</pubDate><guid>https://hugo.curtiscode.dev/post/jquery/using-jquery-callback-functions/</guid><description>I’ve heard questions in the past regarding how to run a script after a jQuery animation or event has been completed.
The majority of these believe that you need to delay the script for a few seconds, allowing the animation to complete before the 2nd function is called. For example:
$foo.load(&amp;#34;MyWebPage.html&amp;#34;); $foo.delay(1000).css(&amp;#34;color&amp;#34;, &amp;#34;red&amp;#34;); Here, the jQuery object $foo is being loaded with a web page’s content, then while this is happening a delay of 1000 milliseconds is set, before the css colour is changed to red.</description></item></channel></rss>