$(document.body).append() doesn't seem to work in IE

后端 未结 1 842
长发绾君心
长发绾君心 2021-01-26 18:31

I am redirecting my user to my default.aspx when his session expires and default page is referenced under a master page. I show a notification like twitter stating Session

1条回答
  •  面向向阳花
    2021-01-26 19:19

    I could not find the place where topBar is called, but if I call it from $(document).ready() it worked like a charm in my IE8:

     
    

    You could also use $(window).load() if you have graphics and/or other heavy elements that needs to be loaded before topBar() is called:

    $(window).load(function() {
        topBar("Hello world!");
    });
    

    Hope it helps.

    EDIT:


    Maybe this can be of some help? Basically you could do something like this:

    ScriptManager.RegisterClientScriptBlock(this, typeof(Page), "json",  
        @"$(document).ready(function(){   
                 topBar("Hello world!");
                 }); 
            });", true); 
    

    Check out the answer in the link because he gives a couple of alternatives

    0 讨论(0)
提交回复
热议问题