开发者

How to load js files first before html in Internet explorer?

I have a jquery treeview script for implementing a tree structure with li tags..when the page is loaded the ul tag is shown with out treeview structure for 1 ~ 2 sec then only it loads the js file.This is only happening in IE browser..rest all browsers are good..anyway to show treeview faster in ie similarly In my html i have

<span id="hide"><img src="path/to/my/image" /></span>

And in my js i have

$(document).ready(function(){
$('#hide).hide():
});

But the image开发者_运维技巧 is shown for 1 sec then only it is hided..only happening in IE Any help guys...sorry being too much elaborated :)


Use CSS to hide the image:

<span id="hide" style="display:none;">


set css "display:none" of your container element.

then at

$(document).ready(function(){
    $(".containerElement").fadeIn("fast", function(){
        $(".containerElement").css("display","block");
    });
});

this will fix the styleless tree.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜