Files
caminus/static/js/market.js
2012-11-17 16:26:42 -05:00

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;
}
});
});
});