title: Javascript callback function not executing
body: <p>I have a callback function that isn't executing. I suspect it's being treated as a string, but I'm not sure.
  The code is below.
  Also, here's a simplified jsFiddle with more details: <a href="http://jsfiddle.net/oakley808/sH5XE/3/" rel="nofollow">http://jsfiddle.net/oakley808/sH5XE/3/</a></p>
  
  <p>Basically it just iterates a for loop, using settings from an object. The final line <code>config.feeds[i].cb</code> is what fails. Ideas anyone?</p>
  
  <pre><code>// the callback function
  function rssdone(){
      $('#cbBlock').append('did some callback stuff&lt;br&gt;');    
  }
  
  // the settings for the loop below
  var config = {
    "feeds": [
      {
          "container": "#block1",
          "url":"http://apps1.eere.energy.gov/news/rss/program.cfm?topic=1010",
          "limit":"4",
          "layoutTemplate": "&lt;ol type='1'&gt;{entries}&lt;/ol&gt;",
          "entryTemplate": "&lt;li&gt;{title}&lt;/li&gt;",
          "cb":"rssdone"
      },
      {
          "container": "#block2",
          "url":"http://apps1.eere.energy.gov/news/rss/financial_opps_solar.cfm",
          "limit":"2",
          "layoutTemplate": "&lt;ol type='A'&gt;{entries}&lt;/ol&gt;",
          "entryTemplate": "&lt;li&gt;{title}&lt;/li&gt;",
          "cb":"rssdone"
      }
    ]
  }       
  
  // the logic    
  for( var i=0; i &lt; config.feeds.length; i+=1 ) {
    $( config.feeds[i].container ).rss(
      config.feeds[i].url,
      {
          limit:          config.feeds[i].limit,
          layoutTemplate: config.feeds[i].layoutTemplate,
          entryTemplate:  config.feeds[i].entryTemplate
      },
      // this fails to use the callback for some reason
      config.feeds[i].cb
  
      // use this instead and it works!
      // rssdone
    );
  
  }
  </code></pre>