javascript - jQuery prop impacts performance in IE 11 -
i have implemented filter in javascript ie11, , other browsers. when key pressed matching options on listbox activated according text. , rest hidden. code far:
function onkeyup(event) { searchkeypress(this, 'actions_options') } function searchkeypress(input, listboxid) { var value = $(input).val(); if (value != "") { if (isie()) { $("#" + listboxid + " option").prop('disabled', true); $("#" + listboxid + " option:contains(" + value + ")").prop('disabled', false); } else { $("#" + listboxid + " option").hide(); $("#" + listboxid + " option:contains(" + value + ")").show(); } } else { if (isie()) { $("#" + listboxid + " option").prop('disabled', false); } else { $("#" + listboxid + " option").show(); } } } function isie() { return navigator.appname == 'microsoft internet explorer' || navigator.appname == 'netscape'; }
problem when start typing in ie11, takes half minute or disable non-matching options, giving feeling not working, although disables them.
Comments
Post a Comment