Dimitris Kougioumtzis Blog About technology

Ajax ordering

Category jquery

Posted on May 28, 2018



Ajax ordering


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
(function($){
  $('.order').on('click', function(e){
      e.preventDefault();
      var url_link = $(this).data('url');
      $.ajax({
          url: url_link,
          method: 'GET',
          data: {order_by: $(this).data('order')},
          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