jquery hide a div that contains flash without resetting it

后端 未结 3 1428
有刺的猬
有刺的猬 2021-01-03 05:59

Greetings, I have written a modal using jquery UI and it appears at the front of a flash movie thus the html inside the modal becomes corrupt, I tried to hide the movie righ

3条回答
  •  -上瘾入骨i
    2021-01-03 06:15

    Tested in FF/linux, FF/WinXp, IE/WinXp, Safari/WinXp:

    • put your flash container DIV into a new DIV with overflow:hidden.

    basic:

    • to hide flash-div: $('#id_div_with_swf').css("left","-2000px");
    • to show flash-div: $('#id_div_with_swf').css("left","0px");

    or, show and hide with animation effects:

    • to hide flash-div: $('#id_div_with_swf').animate({ left: "-2000px"},1000);
    • to show flash-div: $('#id_div_with_swf').animate({ left: "0"},1000);

    html example:


    you can't get a cross-browser working solution with .css('visibility', 'visible'/'hidden')

提交回复
热议问题