I am trying to loop thru a table s and remove them if it doesn't contains a keyword.
The code works, it doesn't throwing any exceptions. And I can debug and see that all correct. But it removes all the tr only for 1-2 seconds than table returns back.
function search() {
var keyword = $('#tbId').val();
$('#tableid').find('tr').each(function () {
if ($(this).html().indexOf(keyword) == -1) {
$(this).remove();}
});
};
PLEASE HELP!!
FIXED!
script is working. Problem was because postback happening in background.