title: Ajax ignoring infinite scroll content loaded into the dom
body: <p>I have a set of posts which are loaded into the page using foreach, and utilises the paginate function with Laravel so I can infinite scroll through the post. Each post has a unique form, the first posts which aren't loaded with js scroll submit fine using ajax, however the posts that are loaded in using JScroll, don't seem to work with ajax, it just loads the forms action rather than the form returning false.</p>
  
  <p>Ajax form post</p>
  
  <pre><code>$(function () {
      $('.vote-btn').on('click', function (e) {
          e.preventDefault();
          $.ajax({
              type: 'post',
              url: '/notes/vote',
              data: $(this).parent('form').serialize(),
              success: function () {
  
              }
          });
      });
  });
  </code></pre>
  
  <p>Jscroll</p>
  
  <pre><code>  $(function() {
     $('.notes-content-con').jscroll({
         autoTrigger: true,
         loadingHtml: '&lt;img src="{{URL::asset("images/ellipsis.gif")}}" alt="Loading" class="paginate-load" /&gt;',
         nextSelector: '.pagination li.active + li a', 
         contentSelector: 'div.notes-content',
  
         callback: function() {
             $('ul.pagination:visible:first').hide();
         }
     });
    });
  
  
     &lt;div class="notes-content-con"&gt;
       @foreach ($notes as $note)
          &lt;div class="notes-content"&gt;
  
                &lt;p&gt;{{$notes-&gt;body}}&lt;/p&gt;
  
                &lt;form action="/vote" method="post" id="vote-form"&gt;
                  &lt;input type="submit" class="vote-btn"&gt;
                  &lt;input type="hidden" name="note-id" value="{{$note-&gt;id}}"&gt;
                &lt;/form&gt;
  
           &lt;/div&gt;
       @endforeach
     &lt;/div&gt;
  </code></pre>
  
  <p>It seems to be because the posts are being inserted after page load, the ajax post doesn't pick it up so the form submit on the loaded posts just go straight to the action. I've tried inserting the ajax into the callback function, but that just creates duplicate post requests which is pointless, I've tried reloading the ajax script which had the same results. A fix would be appreciated because I can't find anything regarding this.</p>