Created
August 8, 2017 09:24
-
-
Save konglie/b03f0c6a36091085bcd9c3e133512361 to your computer and use it in GitHub Desktop.
Filter price at rakitan.com item list.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
created by ali LIM | |
konglie [at] kurungkurawal.com | |
*/ | |
function showHide(max){ | |
console.clear(); | |
var table = $('table').get(8); | |
$('td:nth-child(2)', table).each(function(){ | |
var n = $(this).text().replace(/[^0-9]/g, '') * 1; | |
var tr = $(this).parent('tr'); | |
if(n > max){ | |
$(tr).hide(); | |
} else { | |
$(tr).show(); | |
} | |
}); | |
}; | |
// example | |
showHide(2000000); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment