14 lines
447 B
JavaScript
14 lines
447 B
JavaScript
$(document).ready(function() {
|
|
$('#market-search').keypress(function() {
|
|
var needle = $(this).val().toLowerCase();
|
|
$('#market-prices tr.market-item').each(function (idx, item) {
|
|
var haystack = $(item).find('[class|="inventory-item"] .name').text().toLowerCase();
|
|
if (haystack.search(needle) == -1) {
|
|
item.style.display = "none";
|
|
} else {
|
|
item.style.display = null;
|
|
}
|
|
});
|
|
});
|
|
});
|