title: Jquery Waypoints Using ON
body: <p>I am stuck in a situation where I am injecting waypoints back into the dom using ajax. these new elements wont fire the existing waypoint created before the dom changed.</p>
  
  <p>is there a way to use jquerys On event with waypoints? </p>
  
  <p>I am using waypoints 2.0.2
  <a href="http://imakewebthings.com/jquery-waypoints/" rel="nofollow">http://imakewebthings.com/jquery-waypoints/</a>
  An example case of what i am trying to do is, re instert waypoints that can still use the waypoint method applied to the element specified with .waypoint</p>
  
  <p>The issue I have is that after I insert new divs that are to be waypoints, they do not trigger.</p>
  
  <p>A similar issue happens when you dynamically insert an element that has a click function attached to it after the dom has loaded once, you can not use .click, you use .on("click, "element", function().</p>
  
  <p>one way to get this to work is to just recreate the waypoint inside the waypoint using:</p>
  
  <p>(".nacho").waypoint(function(direction)</p>
  
  <p>Except the reason this doesnt work in my situation is that all previous triggered or scrolled past waypionts will trigger.</p>
  
  <pre><code>&lt;div class="nacho"&gt;
  
  &lt;/div&gt;
  &lt;script&gt;
  $(document).ready(function(){
      $("body").on("waypoint", ".nacho", function(event){
  
      //alert("test");
  
      });
  
      $(".nacho").waypoint(function(direction){
      alert("test");
          $("body").append("&lt;div class=nacho&gt;html to force the window down&lt;/div&gt;");
      } , { offset: "bottom-in-view" });
  
  
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>I tried to reinsert the waypoint nacho back into the dom, after doing so, even with this ON, the waypoints do not trigger.</p>