3 Auto-Refreshing Divs on a page using JQuery but one of them doesn't work?
<p>I have three divs on my page and each one is auto-refreshed using JQuery, here's the HTML:</p>

<pre><code>&lt;div id="photo"&gt;
    &lt;?php require("image.php"); ?&gt;
&lt;/div&gt;

&lt;div id="right-bar"&gt;
    &lt;div id="facebook"&gt; &lt;?php require("graph.php"); ?&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;div id="bottom-bar"&gt;
    &lt;?php require("twitter.php"); ?&gt;
&lt;/div&gt;
</code></pre>

<p>Here is the JQuery:</p>

<pre><code>var imagecacheData;
var imagedata = $('#photo').html();
var imageauto_refresh = setInterval(
function ()
{
    $.ajax({
        url: 'image.php',
        type: 'POST',
        data: imagedata,
        cache: false,
        dataType: 'html',
        success: function(imagedata) {
            if (imagedata !== imagecacheData){
                //data has changed (or it's the first call), save new cache data and update div
                imagecacheData = imagedata;
                $('#photo').fadeOut("slow").html(imagedata).fadeIn("slow");
            }           
        }
    })
}, 60000); // check every minute

var cacheData;
var data = $('#facebook').html();
var auto_refresh = setInterval(
function ()
{
    $.ajax({
        url: 'graph.php',
        type: 'POST',
        data: data,
        dataType: 'html',
        success: function(data) {
            if (data !== cacheData){
                //data has changed (or it's the first call), save new cache data and update div
                cacheData = data;
                $('#facebook').fadeOut("slow").html(data).fadeIn("slow");
            }           
        }
    })
}, 30000); // check every 30 seconds

var twittercacheData;
var twitterdata = $('#bottom-bar').html();
var twitterauto_refresh = setInterval(
function ()
{
    $.ajax({
        url: 'twitter.php',
        type: 'POST',
        data: twitterdata,
        dataType: 'html',
        success: function(twitterdata) {
            if (twitterdata !== twittercacheData){
                //data has changed (or it's the first call), save new cache data and update div
                twittercacheData = twitterdata;
                $('#bottom-bar').fadeOut("slow").html(twitterdata).fadeIn("slow");
            }           
        }
    })
}, 60000); // check every minute - reasonable considering time it takes 5 tweets to scroll across
</code></pre>

<p>As you can see, all of them are pretty much the same thing but the twitter section doesn't auto-refresh at all.</p>

<p>Also, as you can see I am trying to only get the page to do the fade out/ fade in if the response is actually different but it seems to be doing it anyway - any ideas as to why this is?</p>

<p>Thank you for your help in advance</p>
