开发者

When using jQueryUI "toggle", why does div open and immediately close in internet explorer 8?

i have the following code, where ToggleFilter is a button. The button click with EITHER opens or close the div - depending on previous state (based on vis attr).

$("#toggleFilter").click(function (e) {

    var vis = $(this).attr('vis');
    if (vis == '0') {
        $(this).attr('vis', '1');
        $("#toggleFilter").button("option", "icons", { primary: 'ui-icon-search', secondary: 'ui-icon-triangle-1-s' });
    }
    el开发者_如何学Cse {
        $(this).attr('vis', '0');
        $("#toggleFilter").button("option", "icons", { primary: 'ui-icon-search', secondary: 'ui-icon-triangle-1-e' });
    }
    var options = {};
    $("#accordion").toggle('blind', options, 500);
});

anyway, this works fine in Firefox, Chrome, IE7 but in IE8, when i click the button, the accordian opens up and immediately closes. I put an alert() in the code and the click event is only firing once so i can't figure out what is causing the div to show but immediately close on Internet Explorer 8.

has anyone seen this weird behavior in IE8 and has a suggestion?


still don't fully understand why but upgrading from jquery 1.4.2 to 1.4.4 seems to have fixed the issue.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜