开发者

How do I make a jQuery dropdown checklist hide until it's built properly in IE6?

I'm using the jQuery dropdown checklist plug-in. When the it gets wired up to a multi-select box, you can see the multi-select render for an instant then the correct looking dropdown shows up. It's noticeable on page load but it's especially ugly on partial postbacks when it flashes the larger multi-select for an instant.

I was thinking I could hide it by adding a beginRequest call to hide and a show on end request but it doesn't work. Is there a way to check when the checklist is finished wiring up such that I can displayed it at that point? I'm having a hard time even hiding the dropdown checklist at all programmatically via javascript.

Any ideas?

Update

So, apparently, this is an IE6 only issue. Problem is, IE6 is the only browser this app is going to run in. The ugliness occurs on page load in even the simplest instance of creating a dropdown checklist. i.e.

$(function() {
    $('#MySelect').dropdownche开发者_StackOverflow社区cklist();
});


I have the same problem and I just hide the dropdown (i.e. I add style="display:none" to the drop down)... Then when the dropdownchecklist is built it will appear in the correct space.

If you are worried about the loading in of the dropdownchecklist pushing the page down when its loaded, you could put a div around the dropdown with the expected height of the dropdownchecklist in its closed position.

Also if you want to get even more fancy you could render the words "Please wait" next to the hidden dropdown within the div and when the dropdownchecklist is loaded remove the text.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜