javascript - jQuery .attr(“disabled”, “disabled”) not working in IE 10 -


i'm having issues attr('disabled', 'disabled') or prop("disabled", true) in internet explorer jquery in firefox, , chrome, behaves expected. ideas?

i trying disable item in dropdown list in mvc application. doesn't work in ie.

var count = parseint($("#numcount").val());     if ((isnan(count) === false) && (count > 500)) {         $("#reporttype option[value='report']").attr("disabled", "disabled");         $("#reporttype option[value='report']").prop("disabled", true);      } 

this should work on ie 9+, maybe ie 8.

reasons why may not work when browser forced ie 7 behaviour:

  1. a <meta> tag may have been used emulate ie7 (this done in past older sites keep working).

  2. something else may have triggered quirks mode, , bets off when happens.

the developer tools (f12) can here.


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -