Thread: Timebased event
View Single Post
Old 10-04-2009, 08:05 PM   #4 (permalink)
ETbyrne
how quixotic are you?
 
ETbyrne's Avatar
 
Join Date: Dec 2007
Location: Lapeer, MI
Posts: 445
Thanks: 37
ETbyrne is on a distinguished road
Default

Add myfunction() after you load the new image:

Code:
$(document).ready(function() {

    function myfunction()
    {
        
        // This will hold our timer
        var myTimer = {};
        
        myTimer = $.timer(2000, function(){

            // Load the new image.
            $("#head").load("HeaderChanger.php");

            myfunction();

        });
    
    }
    
    while(true)
    {
    
        setTimeout(myfunction(), 2000);
    
    }

});
Also, for this particular application you may want to consider using the more simple Delay Plugin.

Btw how do you do the javascript code coloring?
__________________
Dingo Web Systems > http://www.dingocode.com
My Website > http://www.evanbot.com
ETbyrne is offline  
Reply With Quote