开发者

IE javascript / jquery issue

开发者 https://www.devze.com 2023-02-08 21:44 出处:网络
I am trying to get these 2 select drop downs to work which basically rely on each other for out of stock. The idea is that out of stock combination would be disabled from the user selection. This work

I am trying to get these 2 select drop downs to work which basically rely on each other for out of stock. The idea is that out of stock combination would be disabled from the user selection. This works fine in all browsers except IE.

I found a script for IE which basically adds disabled class and does an alert pop up and then resets the select dropdown.

Here is a demo: http://jsbin.com/osipe5/2

In that, please select size as 1X. As you can see everything works perfectly. We are good. Now select size 2X. In the color dropdown "White" has the disabled class. That is not correct. The issue is somewhere开发者_如何学JAVA with ieLessThan8OptionDisable()

Any help is much appreciated.

Thanks


I'm guessing the problem is this line in ieLessThan8OptionDisable():

this.blur();

Change it to $(this).blur();. But seriously, please stop writing browser-specific code with jQuery.


Since you're running into a common IE pre-8 bug, you might want to see this question.

0

精彩评论

暂无评论...
验证码 换一张
取 消