views:

637

answers:

2

Hi,

once more a jQuery, Firefox flickering issue. (no flickering in IE6/7/8, Safari)

I uploaded an example page here: http://sithlord.bplaced.net/testing/jquery_flickering/flickering.html

There are two div containers. The inner div is the one I'm hiding. The outer one is the wraping container with the style elements. I found the flicker only occur with the selectbox. Without the SelectBox there is no flickering.

But thats not all: (I cant post a second hyperlink: its the same link as above; only change "flickering.html" to not_flickering.html)

In this case I selected a lower "option" - as you can see, the flicker disappears in this case. The same is happending, when there are less options in total. (less then about 20)

The only workaround I found is deleting the selectbox :)

Any ideas, why this is happening and how to fix it?

Thanks!

A: 

Hey Sithlord,

Found this post. Try setting a width or height on the hidden div. I noticed you have no styles on your divs so its possible this may work.

Metropolis

Metropolis
Hi Metropolos,thanks for your answer.You mean something like this?http://sithlord.bplaced.net/testing/jquery_flickering/hidden_select_appended.htmlBut now you get an other bad effect. You 'see' the select box appear.And there is still the question, why this flicker appears with big hidden select boxes :)GreetingsSithlord
Sithlord
Width and Height arent helpin. Same flicker.
Sithlord
Just for kicks....try changing all p tags to div tags...
Metropolis
Also try to add overflow: hidden; to the hidden element
Metropolis
I already thriet the overflow: hidden "trick"; doesn't work.The 'p' elements are also just for testing. Could be span, div, or something else. Makes no difference.I think the problem is the select box. Just why?
Sithlord
A: 

Please see http://dev.jquery.com/ticket/5743 why such things are generally possible with jQuery. In short while the css function without parameters claims to only return values without updating anything, it actually updates the DOM in some cases.