asp.net - jquery filter asp checkboxlist performance -
i filtering asp:checkboxlist of 2000 items , having performance problems. know lot of items, maybe code not ideal? if code fine, there other ways boost performance or pretty pushing limit? thank time:
$('#tbsearchusers').bind('keyup', function (event) { var query = $(this).val().tolowercase(); $('#cblusers input[type="checkbox"]').each(function () { var label = $("label[for='" + $(this).attr('id') + "']").text().tolowercase(); if (label.indexof(query) > -1) { $(this).parent().parent().css('display', 'block'); } else { //get parent tr , hide $(this).parent().parent().css('display', 'none'); } }); });
Comments
Post a Comment