How to stop SWF inside jQuery UI tab on reboot

I have a SWF movie inside the jQuery UI tab, and the problem I am having is that SWF reloads every time I click on a tab in another tab and then click back. I can check the DOM and see that the div containing the SWF is still in the DOM when I click, so I don't know why this seems to reload it when I click on the tab.

I added the following CSS rules to prevent display from setting: none, but the Flash movie still reloads:

.ui-tabs .ui-tabs-hide {
    display: block !important;
    position: absolute;
    left: -10000px;
}

Update. It turns out that this is due to the next Firefox bug that has existed since 2001 / Firefox 0.9. However, I still don't have a good workaround.

+5
source share
3 answers

The solution mentioned earlier works in Chrome, but not in Firefox for any reason (I'm sure it worked a while ago). I found another solution:

first you need a general rule to β€œhide” content without using a display: none;

/** hide the tab without using display:none; **/
.ui-tabs .ui-tabs-hide {    
display: block !important;
height: 0!important;
width: 0!important;
border:none!important;
visibility:hidden!important;

}

/** make sure your swf does not have leftover height when hidden **/
.ui-tabs .ui-tabs-hide object,
.ui-tabs .ui-tabs-hide embed {
    height: 0;
    width: 0;
}

This works for me. Tell me if this works for you! Jerome WAGNER

+4
source

(, firefox) -, hide/show (display: none;). , . , ,

  • : absolute;
  • , , /.

, .

,

+1

. jQuery .

.ui-tabs .ui-tabs-hide

css :

.ui-tabs .ui-tabs-panel[aria-hidden="true"]

,

+1

All Articles