title: Meteor JS Template rendered function called before template is rendered?
body: <p>I'm trying to use the Buttonset widget in JQuery UI. I've got the package loaded and my template renders the radio buttons fine. I have a "rendered" function to call the JQ UI routine to setup the buttonset:</p>
  
  <pre><code>Template.teamList.rendered = function () {
      $("#buttonsetID").buttonset();
  }
  </code></pre>
  
  <p>But it looks like the rendered function is being called <em>before</em> the template is rendered! I stick a console.log in the function and it prints out to the console before there's anything on the screen. So none of the radio buttons are set up, therefore the .buttonset() call does nothing. If I make that call in the console after the page is rendered, JQuery UI does the right thing and my button set appears.</p>
  
  <p>Isn't the .rendered function supposed to be called after everything's set up? Am I doing something wrong?</p>
  
  <p>Thanks!</p>
  
  <p>edit:</p>
  
  <p>As an example, the same thing is seen in the leaderboard example.</p>
  
  <p>If you add:</p>
  
  <pre><code>  Template.leaderboard.rendered = function() {
       alert($('.player').length);
    }
  </code></pre>
  
  <p>When the page is displayed, it will show 0. This makes it difficult to access the DOM items if you need to add some JQuery events or, in this case, a JQuery UI element.</p>