WordPress.org

Ready to get started?Download WordPress

Forums

Refresh div ajax . (1 post)

  1. Angus Todman
    Member
    Posted 1 year ago #

    I'm trying to refresh the countdown hangout widget in the sidebar-right of the theme 'pinboard'. When it next refreshes after the countdown timer reaching '0' an ON AIR button should appear. This works when its hard refreshed though not at the moment with current code.
    Im quite new to ajax and Ive tried a few different options though this one seems to get the closest. Any tips would be very appreciated.
    The code has been taken out of the head for the time being.

    here is the link.

    http://globallingos.com/classes/

    <script src="http://ajax.googleapis.com/ajax/
    libs/jquery/1.3.0/jquery.min.js"></script>
    <script>
    var auto_refresh = setInterval(
    function()
    {
    $('#sidebar-right').fadeOut('slow').load('sidebar-right.php').fadeIn("slow");
    }, 20000);
    $(document).ready(function(){
    $('#loaddiv').load('sidebar-right.php')
    })
    </script>

    What happenes is that it fades out etc though does not show the new information when it is suposed to.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.