Sourcebits Body Background abt-left abt-rgt ser-left ser-rgt service-grid service-top service-mid portfolio-left portfolio-right selection menu-icons arrow tab_menu top-menu left-menu about-menu content-body content-top content-bottom

Sourcebits Blog

Back

Universal fix for Safari jQuery bugs?

27Sep

Details: Safari 2.0.4 on Mac, JQuery 1.2.1

I had a good time breaking my head over jQuery rendering bugs in Safari. Somehow I managed to find the fixes for the bugs I encountered. I hope this post will come handy to those who WILL come across the bugs. The fault is Safari’s.

Bug 1: Objects blink out when doing a fadeIn (basically a call to the animate function with opacity property) animation.
Bug 2: Objects dislocate when doing a fadeIn animation.

For bug no.1, when you select the empty space left by the object that disappeared, the object reappears most of them time. That hints, some axial action needs to be done on the object to make it reappear or prevent it from disappearing.

This is how we do it:

$(’#foo’).fadeIn(‘slow’, function() {
$(’#foo’).css(‘position’, ‘relative’).css(‘left’, 0).css(‘top’, 0);
});

We force a position property on it for an axial action with no real effect (left:0, top:0).

Bug no.2 gave me no hints as how I might fix it. But applying the same fix solved it.

I remember telling someone to try that fix for an unrelated bug resulting at the end of a jQuery animation. Don’t remember the details but looks like it fixed that too.

Universal fix for Safari jQuery bugs? :D

Posted by staff in Web. 0 Comments

Leave a Reply

You must be logged in to post a comment.

About Us

About Us

Sourcebits is a Macintosh, iPhone, Android and Web development company. Our efforts on the Mac are focused on researching and developing innovative and engaging applications that are new in the market or something we believe can be done in a better way. On iPhone and Android we are among the industry front runners and are among the first to develop applications for the platform. On the Web front, we develop world class quality web sites and web applications by considering the latest development trends and techniques, ensuring nothing is outdated.

Contact Us

Contact Us

Sourcebits develops outstanding services and applications for iPhone, iPad, Blackberry, Android, Mac and the Web. Our 200+ strong team of dedicated programmers and graphics designers spend their days building intelligent, easy to use applications leaving you free to focus on your next project. Contact Sourcebits today.