Sha256: 77c093fdb2131673d26e109ad0779115e90084cf77eaae1925f8097d06d30400

Contents?: true

Size: 818 Bytes

Versions: 1

Compression:

Stored size: 818 Bytes

Contents

(function ($) {
  $.fn.handleLinkClick = function(){
  	
	$(this).on('click', function(e){
		e.preventDefault();
		var $el = $(this);
		var $parent = $el.closest('.pagination_container');
		var $p_canv = $el.parent().siblings('.pagination_canvas');
		var data_attributes = $parent.data();	
		var server_response = ajaxPagination.sendPaginationRequest(data_attributes);
		var response;
		server_response.done(function(data){
			response = {status: 'success', data: data};
			ajaxPagination.buildDomElements($p_canv, data_attributes.template, response);
			ajaxPagination.drawLinkIcons($el, $parent, response);
		}).fail(function(jqXHR, textStatus, errorThrown){
			response = {status: 'fail', data: []};
			ajaxPagination.buildDomElements($p_canv, data_attributes.template, response);
		});
	});
	
  };
})(jQuery);




Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pagination_ajax-1.0.5 spec/javascripts/helpers/plugin.js