Reputation: 2760
I'm trying to hide some embedded flash objects without disabling them. Right now I'm placing them in a div, and using the jQuery UI hide method. The problem is, when I show the flash later using the show method, the flash reloads. Is there any way to prevent this?
Is it possible to have the flash hidden but still working in the background? To hold the position of a youtube video that was paused in the div before it was hidden for example?
Upvotes: 3
Views: 6097
Reputation: 4875
This solution prevent also flash reloading on showing:
.hidden {
width: 0;
height: 0;
}
Upvotes: 1
Reputation: 2030
Answer from nick is corret BUT watch out for wmode. If set to transparent the browser definitely will stop its execution (music, local connection, network, etc) and might also restart the movie.
Caused me some headaches in the past : )
Upvotes: 2
Reputation: 546253
Try this CSS:
embed.hidden {
position: absolute;
left: -10000px;
}
Then to unhide it, you just need to remove the class "hidden"
Upvotes: 4
Reputation: 28215
You could either wrap it in a div
and set that div
's display
to none or it's height
to zero - I believe that if you set display:none
on the actual object
where the flash lives, it won't render the flash content. I could be wrong though.
Upvotes: 0