Author |
Message |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Attach PIE.js automatically on elements with CSS3 properties
Last edited by xem on Wed Nov 23, 2011 7:28 am, edited 4 times in total.
|
Sat Oct 15, 2011 6:01 am |
|
 |
webaware
Joined: Mon Apr 11, 2011 4:54 pm Posts: 53
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
|
Mon Nov 07, 2011 3:33 pm |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
Thanks for your advice webaware
My goal wasn't really to cover cases of huge pages with lots of Pie's elements, I just want to automate the process of PIE attachment to any element needing it.
You're right about the non-use of jQuery, and about the more efficient use of other fixes than PIE in particular cases.
Anyway, I'm going to try your code. I'll post an updated version here if it works!
|
Fri Nov 18, 2011 9:14 am |
|
 |
guugie
Joined: Fri Nov 18, 2011 12:14 pm Posts: 1
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
Very nice script. Thank you very much, will use it on my current project, right now 
|
Fri Nov 18, 2011 12:22 pm |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
No problem, it's here to be shared (and enhanced by people that know Javascript better than me ^^)
|
Mon Nov 21, 2011 1:41 am |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
|
Mon Nov 21, 2011 10:24 am |
|
 |
webaware
Joined: Mon Apr 11, 2011 4:54 pm Posts: 53
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
|
Mon Nov 21, 2011 3:21 pm |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
Indeed, thanks, it works perfectly on IE6-7-8
But on IE9, my getStyleProperty test passes on every element of the page, not just the 3 DIVs
( IE9 always agrees with "if(getStyleProperty(element,'border-radius')||getStyleProperty(element,'box-shadow')||getStyleProperty(element,'-pie-background'))" )
Do you know why?
Do you have a better way to detect if a css property is applied to an element?
Maybe jQuery's .css() ...
|
Tue Nov 22, 2011 4:15 am |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
Nope, jQuery's .css() doesn't have any effect.
And I couldn't find a way to attach PIE only to the right elements on IE9...
|
Tue Nov 22, 2011 6:40 am |
|
 |
xem
Joined: Thu Apr 07, 2011 3:23 am Posts: 73
|
 Re: Attach PIE.js automatically on elements with CSS3 proper
|
Tue Nov 22, 2011 6:51 am |
|
|