javascript - on(“click”) only firing after second click -


i'm using anchor link load more posts issue it's not firing in first click (at first time only) load more posts in second time, works first click.

jquery(window).load(function() {      jquery('#load-more').on('click', function (){                  if( !(count > total) && (count > 1) ){              //function              loadarticle(count, total, load_method, page_id, blog_style, blog_page_image_size, show_post_animation, item_animation);          }                  count++;            // function          nomorearticles(count, total, load_method);                      return false;      });  });
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>    <a id="load-more" href="#">load more</a>

jquery(window).load(function() { try jquery(document).readyfunction() {

may images not loading issue


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -