-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscript.js
More file actions
25 lines (23 loc) · 897 Bytes
/
script.js
File metadata and controls
25 lines (23 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function search()
{
for (var i = 0; i <= $('a').length * 2; i++) {
if($('a:nth-child(' + i + ')').data('price') <= $('#price').val()
&& ($('a:nth-child(' + i + ')').data('category') == $('#category').val() || $('#category').val() == "anything")
) {
$('a:nth-child(' + i + ')').fadeIn();
$('a:nth-child(' + i + ')').next().fadeIn();
} else {
$('a:nth-child(' + i + ')').fadeOut();
$('a:nth-child(' + i + ')').next().fadeOut();
}
}
$("#suchlist").attr("href", "https://www.suchlist.com/index.php?page=search&sPriceMax=" + $('#price').val() + "&sOrder=i_price&iOrderType=desc")
$("#suchlist-price").html("under " + $('#price').val() + " doge")
}
$(document).ready(function () {
$('a').fadeOut();
$('p').fadeOut();
$('#price').keyup(function () {
search();
});
});