php - Laravel + ajax pagination -


i have code it's working wrong. animation not working , when press button go next page makes 2 same sidebars different content. how make change nicely , don't make second same sidebar ?

  <div id="ajaxcontent">     {!! $commentslatest->render() !!}     </div>      <script>     $('#ajaxcontent').load('$commentslatest');      $('.pagination a').on('click', function (event) {         event.preventdefault();         if ( $(this).attr('href') != '#' ) {             $("html, body").animate({ scrolltop: 0 }, "fast");             $('#ajaxcontent').load($(this).attr('href'));         }     });     </script> 


Comments

Popular posts from this blog

How to provide Authorization & Authentication using Asp.net, C#? -

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

How to use Authorization & Authentication in Asp.net, C#? -