title: How to unbind or turn off all jquery function?
body: <p>I have constructed an app with push state. Everything is working fine. However in some instances my jquery function are fireing multiple times. That is because when I call push state I bind the particular js file for each page I call. Which means that the same js functions are binded many times to the html while I surf in my page. </p>
  
  <p>Tip: I am using documen.on in my jquery funciton because I need my function to get bound to the dynamical printed HTML through Ajax.</p>
  
  <p>I tried to use off in the push state before printing with no success!</p>
  
  <p>Here is my code:</p>
  
  <pre><code>var requests = [];
  
          function replacePage(url) {
  
              var loading = '&lt;div class="push-load"&gt;&lt;/div&gt;'
              $('.content').fadeOut(200);
              $('.container').append(loading);
  
              $.each( requests, function( i, v ){
                  v.abort();
              });
  
              requests.push( $.ajax({                     
                      type: "GET",
                      url: url,
                      dataType: "html",
                      success: function(data){            
  
                          var dom = $(data);
                          //var title = dom.filter('title').text();
                          var html = dom.find('.content').html();
                          //alert(html);
                          //alert("OK");
                          //$('title').text(title);
                          $('a').off();
                          $('.push-load').remove();                       
                          $('.content').html(html).fadeIn(200);
                          //console.log(data);
  
                          $('.page-loader').hide();
                          $('.load-a').fadeIn(300);                       
                      }
                  })
              );
          }
  
          $(window).bind('popstate', function(){
              replacePage(location.pathname);
          }); 
  </code></pre>
  
  <p>Thanks in advance!</p>