Dimitris Kougioumtzis Blog About technology

Ajax pagination

Category jquery

Posted on May 28, 2018



Ajax pagination


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
(function($){
    $(document).ready(function(){
      $('.page').on('click', function(e){
          e.preventDefault();
          $(".pagination li").removeClass("active");
          var url_link = $(this).attr('href');
          $(this).parent().toggleClass('active');
          $.ajax({
              url: url_link,
              method: 'GET',
              datatype: 'json',
              success: function(result){
                $("#result").html(result.result);
              }
          });
      })
    });
})(jQuery)

About

My name is Dimitris Kougioumtzis and i work as a Web developer at Rapidbounce Company

Elsewhere