Ticket #9353 (closed bug: worksforme)
Flicker on load
| Reported by: | anonymous | Owned by: | anonymous |
|---|---|---|---|
| Priority: | low | Milestone: | 1.next |
| Component: | manipulation | Version: | 1.6.1 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
I have a code that addClass to elements similar to $(function(){
$("#elm").addClass("transform");
});
In Jquery 1.5.1, the page loads correctly.
In Jquery 1.6.1, the page shows the element, then it shows the element with the class applied. Eg: it flickers.
Playing with firebug and trying to find the difference in Jquery code path, I can not figure out why...
Change History
comment:2 Changed 2 years ago by anonymous
On IE8, 1.6.1 does not flicker On FF3 and FF4, 1.6.1 flicker
comment:3 Changed 2 years ago by addyosmani
- Owner set to anonymous
- Priority changed from undecided to low
- Status changed from new to pending
- Component changed from unfiled to manipulation
Thanks for taking the time to contribute to the jQuery project! Please provide a reduced test case on http://jsFiddle.net that reproduces the issue experienced to help us assess your ticket!
Additionally, test against the jQuery (edge) version to ensure the issue still exists.
comment:4 Changed 2 years ago by anonymous
- Status changed from pending to new
It flickers when you click run
comment:5 Changed 2 years ago by addyosmani
- Status changed from new to closed
- Resolution set to worksforme
Thanks for submitting a test case. I've run this multiple times in FF4 and FF3 using jQuery 1.6.1 but haven't been able to reproduce the flicker you're experiencing. Please note that on occasion a number of factors may contribute to such a flicker being experienced. These include but are not limited to: server latency (your local code, jQuery version or other files may be taking longer to load than usual), latency on jsFiddle's side and possibly other logic or resources in your page which may be blocking page assets from loading or executing when desired. We'll be closing this ticket, but please feel free to let us know if you are able to supply additional test cases that demonstrate the behaviour.
comment:6 Changed 21 months ago by anonymous
I have the same experience when upgrading from 1.5.1 to 1.6.1. Only jQuery loaded. When i disable javascript the flicker has been gone. I use firefox 6.0, IE 9.
Also is there a bug in the prop function in IE 9. return elem[ name ] cause an Error. Breaks all other code. I fixed with this workaround:
jQuery.prop = jQuery.prop; jQuery.prop = function(e, n, v) { try{ return jQuery.prop(e,n,v); } catch(e) {return false;}};
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Just checked with 1.5.2, no flicker either.