0
在這裏我正在排序正確,但按降序排序時,它會轉到分頁的最後一頁。請給出任何想法,而不改變分頁號碼。用分頁排序(jQuery)
function SortbyPrice(type){
if (type == 'ascending') {
$(".holdereBookings .jp-previous").next().trigger("click");
$('div.HotelInfoBox').map(function() {
return {val: parseFloat($(this).data('price')), el: this};
}).sort(ascending).map(function() {
return this.el;
}).appendTo('.hotel-list');
}else{
$(".holdereBookings .jp-next").prev().trigger("click");
$('div.HotelInfoBox').map(function() {
return {val: parseFloat($(this).data('price')), el: this};
}).sort(descending).map(function() {
\t return this.el;
}).appendTo('.hotel-list');
}
}