开发者

Does IE8 recognize state attribute changes via jQuery?

I am using jQuery to change a state attribute from 0 to 1. It seems to be working fine in all modern browsers, but is not working in IE8. I have been unable to determine if I am merely doing something wrong or if IE8 does not recognize state attribute changes.

Here i开发者_运维问答s the code:

$('#selection-information').attr('state', 1);
     acc.children('.step').each(function(i){
        if($(this).attr('state') == 0) 
        {
    next = i;
    return false;
    }
})
    if(whichButton=='complete'){
     acc.accordion('activate',next);  

For what it's worth, I asked a question related to the above in this post.


Maybe ie8 recognize all attributes as string

So you can try:

($(this).attr('state') == "0") 

or

parseInt($(this).attr('state')) == 0
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜