title: Mustache doesn't handle events properly
body: <p>I want to use mustache to insert some templates in my html file.</p>
  
  <p>The template, jquery code and html code are in three separate files. This is mandatory cause I want my project to get as much organized as possible. </p>
  
  <p>When I write my 'nav' directly into html file the click event works fine, but if try to insert it with mustache it stops working. Any idea why?
  Thank you.</p>
  
  <p>test1.php file </p>
  
  <pre><code>&lt;html&gt;
      &lt;head&gt;
          &lt;title&gt;World News&lt;/title&gt;       
          &lt;script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"&gt;&lt;/script&gt;
          &lt;script src="http://ajax.aspnetcdn.com/ajax/jquery.ui/1.8.9/jquery-ui.js" type="text/javascript"&gt;&lt;/script&gt;
          &lt;script src = "https://raw.github.com/janl/mustache.js/master/mustache.js" type = "text/javascript"&gt;&lt;/script&gt;
          &lt;style&gt;
              body{
                  background-color: #FFFFFF;  
                  position: absolute;
                  top: 10%;
                  left: 15%;
                  right: 15%;
              }
  
              #menu ul li{
                  display:inline;
                  padding: 0;
                  margin: 0;
              }
          &lt;/style&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;header&gt;                        
              &lt;section id="menu" class="clear"&gt;
                  &lt;!-- Insert the 'navigationBar' template --&gt;                                                                                
              &lt;/section&gt;                      
          &lt;/header&gt;
          &lt;!-- End of header --&gt;
  
          &lt;script type="text/javascript" src="process1.js"&gt;
  
          &lt;/script&gt; 
  
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>process1.js</p>
  
  <pre><code>    function Guardian_news(filter, selector, div)
      {   
          this.path = 'fullwindow1.html';
          this.filter = filter;
          this.selector = selector;   
          this.populate = function(){ 
              $.get(this.path, function(templates){
                  var template = $(templates).filter(filter).html();
                  $(selector).html(Mustache.render(template));
              });
          }
  
      }
  
      $(document).ready(function(){
          var  menu;
          menu = new Guardian_news('#navigationBar', '#menu');        
  
          menu.populate();
  
          $('#science').click(function(){
      alert('url accessed');
          });
  
  
      });
  </code></pre>
  
  <p>fullWindow1.html</p>
  
  <pre><code>    &lt;script id="navigationBar" type="text/x-mustache-template"&gt;             
          &lt;nav&gt;               
              &lt;ul&gt;                
                  &lt;li&gt;&lt;a id="politics" href="#"&gt;Politics&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id="science" href="#"&gt;Science&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id="health" href="#"&gt;Health&lt;/a&gt;&lt;/li&gt;         
                  &lt;li&gt;&lt;a id="media" href="#"&gt;Media&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id="arts" href="#"&gt;Arts&lt;/a&gt;&lt;/li&gt;         
                  &lt;li&gt;&lt;a id="weather" href="#"&gt;Weather&lt;/a&gt;&lt;/li&gt;
                  &lt;li&gt;&lt;a id="sports" href="#"&gt;Sports&lt;/a&gt;&lt;/li&gt;
              &lt;/ul&gt;                   
          &lt;/nav&gt;                          
      &lt;/script&gt;
  </code></pre>