title: jquery not working on appended content (after infinite scroll)
body: <p>i have a jquery function that displays a hidden content on each element in the loop of elements. This work perfectly, but the problem is that when i append new elements to the loop it stops working. It actually works on some elements and doesn't work on others (strange behavior).</p>
  
  <pre><code>  &lt;script type="text/javascript"&gt;
    jQuery(document).ready(function($) {
  
    $(".see_all").click(function(){
  
    if ($(this).next().css('display') == 'none'){
    $(this).next().show();
  
    }
    else
  
    if($(this).next().is(':visible')){
    $(this).next().hide();
    }
  
    });
    })
    &lt;/script&gt;
  </code></pre>
  
  <p>Html CODE</p>
  
  <pre><code>   &lt;div class="center_container"&gt;
     &lt;%for users in @user%&gt;
     &lt;div class="see_all"&gt;
  
     &lt;span style="color:#808080;cursor:pointer"&gt;See All Reviews(&lt;%=@beep_count=           (@beep.opposes.count +  @beep.neutrals.count + @beep.supports.count)%&gt;)&lt;/span&gt;
  
     &lt;/div&gt;
  
     &lt;div style="display:none;" class="hidden"&gt;
  
      No reviews available 
  
      &lt;/div&gt;
     &lt;%end%&gt;
  
     &lt;/div&gt;
  </code></pre>
  
  <p>i have tried solving it with this </p>
  
  <pre><code>   $("body").on("click", ".see_all", function() { 
     if ($(this).next().css('display') ==   'none')
      { 
      $(this).next().show(); 
      } 
      else 
      if($(this).next().is(':visible'))
      {                    
      $(this).next().hide(); 
      } 
      });
  </code></pre>
  
  <p>but it didn't work. am i making a mistake in my new jquery solution :( </p>
  
  <p><strong>PLEASE HELP</strong>   </p>