View unanswered posts | View active topics It is currently Thu Jun 21, 2018 12:16 pm

Reply to topic  [ 3 posts ] 
 Repeated jquery addclass/removeclass calls breaks pie 
Author Message

Joined: Mon Jan 17, 2011 2:07 am
Posts: 2
Post Repeated jquery addclass/removeclass calls breaks pie
I have been using css3 pie since discovering it a few months ago.
F'ing Brilliant work!

I have no doubt at all that this one bit of code has saved my many aggravating hours of work cutting up images of rounded stuff.

I sure wish I had read the bit about position: relative; and z-index: about 2 hours ago tho.

So now my menu does work; at first.
However if you run your mouse back and fourth across the menu a few times the pie will suddenly break with the following errors.

Message: 'f' is null or not an object
Line: 71
Char: 367
Code: 0

Message: Object doesn't support this property or method
Line: 75
Char: 96
Code: 0

Fortunately the artist and most of my clients use firefox anyways however this WILL come to light sooner or later.

Rared demo:

I tried with beta 2 and 3
beta 2 had some odd positioning issue: sometimes it would be off by 5 or so pixels.
beta 3 is hella nicer but still the oddness. Memory leak?

Edit: this is all in IE 8 in windows 7 pro x64.


Mon Jan 17, 2011 2:25 am

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1452
Post Re: Repeated jquery addclass/removeclass calls breaks pie
Thanks very much for sending that standalone demo, it always makes things easier to debug. :)

The good news is that this error has already been fixed in the current development code, so it won't happen in future releases, and if you want to build from the latest source code you can have the fix now.

The better news is that there's an easy workaround in the current version: move your behavior and -pie-watch-ancestors properties out of .active_tab and into the main .menu_tab block. This causes the behavior to be initialized only once per tab and handle the hover changes internally, rather than initializing and destroying the whole behavior each time you hover (which is what is triggering that bug.) Actually I'd recommend making this change anyway even if the bug weren't there, because its performance will be better and you'll avoid seeing flashes of square corners as you hover.

Mon Jan 17, 2011 9:54 am

Joined: Mon Jan 17, 2011 2:07 am
Posts: 2
Post Re: Repeated jquery addclass/removeclass calls breaks pie
*slaps forehead*

Thank you sir.
Moving the behavior up never occurred to me.

Keep up the awesome work!
Even with the time I spent on this silliness your work has saved me many hours (and my clients many dollars).

Mon Jan 17, 2011 12:24 pm
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.