Skip to content

Commit

Permalink
-price range
Browse files Browse the repository at this point in the history
  • Loading branch information
abdulrahman committed Oct 30, 2024
1 parent d876f19 commit dafc960
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion src/shop.html
Original file line number Diff line number Diff line change
Expand Up @@ -1148,7 +1148,27 @@ <h5 class=" my-1 text-[#191c1e] text-sm ">أقوى سبراي للجسم طار
event.stopPropagation(); // Prevent click from bubbling up
dropdownsortBy.classList.toggle('hidden');
});
// Pagination Setup
// pice range
function range() {
return {
minprice: 1000,
maxprice: 7000,
min: 100,
max: 10000,
minthumb: 0,
maxthumb: 0,

mintrigger() {
this.minprice = Math.min(this.minprice, this.maxprice - 500);
this.minthumb = ((this.minprice - this.min) / (this.max - this.min)) * 100;
},

maxtrigger() {
this.maxprice = Math.max(this.maxprice, this.minprice + 500);
this.maxthumb = 100 - (((this.maxprice - this.min) / (this.max - this.min)) * 100);
},
}
}
// Pagination Setup
let currentPage = 1;
const totalPages = 10;
Expand Down

0 comments on commit dafc960

Please sign in to comment.