Bug Tracker

Opened 9 years ago

Closed 9 years ago

Last modified 8 years ago

#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:
Blocked by: Blocking:

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 (6)

comment:1 Changed 9 years ago by anonymous

Just checked with 1.5.2, no flicker either.

comment:2 Changed 9 years ago by anonymous

On IE8, 1.6.1 does not flicker On FF3 and FF4, 1.6.1 flicker

comment:3 Changed 9 years ago by addyosmani

Component: unfiledmanipulation
Owner: set to anonymous
Priority: undecidedlow
Status: newpending

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 9 years ago by anonymous

Status: pendingnew

http://jsfiddle.net/rHHtF/

It flickers when you click run

comment:5 Changed 9 years ago by addyosmani

Resolution: worksforme
Status: newclosed

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 8 years 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;}};

Note: See TracTickets for help on using tickets.