jQuery fadeIn IE Png Issue when loading from external

后端 未结 7 832
-上瘾入骨i
-上瘾入骨i 2020-12-10 23:51

I am loading data from external html files within my domain into a div on my webpage using a load content method in jQuery. I take the div out of the new page whilst hiding

7条回答
  •  臣服心动
    2020-12-11 00:08

    @jdln -- I'm not sure if this is what she was going for and explained it wrong, or if this is another solution, however this worked for me:

    1. Apply the transparent PNG to a wrapper element
    2. Apply your fade to an element INSIDE the wrapper. This seems to force the wrapper element to display as well.
    3. Hide the wrapper element, show the content element using jQuery fade

    For example:

    /* HTML: */
    
    I use this for a drop-down menu with a transparent PNG shadow for lte IE8 browsers
    /* CSS */ #wrapper{margin-left:-9999px;} /* jQuery */ $('#content').hide().fadeIn();

    I use .hide() to make sure that the effect starts from the beginning every time, as I'm calling this from a hover event. Hope this helped!

提交回复
热议问题