My problem occurred today when I tried to replace all of the above CSS and inject the behavour into elements that already have a border-radius CSS property instead. (For simplicity I've used the most basic of code below; using only the body selector. The full script included an if statement):

... both worked. I know this because in both cases the script crashed IE(8).

Is it possible to use CSS3PIE in combination with jQuery? Has anyone else tried this?

Thanks,

Wed Aug 11, 2010 9:22 am

ldexterldesign

Joined: Wed Aug 11, 2010 9:14 amPosts: 3

Re: Injecting the good stuff via jQuery = :[

*Bump?*

Mon Aug 16, 2010 3:04 am

jason

Joined: Wed Jul 14, 2010 11:46 amPosts: 1452

Re: Injecting the good stuff via jQuery = :[

It's certainly possible to apply the behavior via jQuery, as the css3pie.com homepage does exactly that for the demo. Try using the syntax:

Code:

element.addBehavior('url/of/PIE.htc');

That said, applying the behavior this way has performance implications, namely that you won't get any CSS3 styles applied until after jQuery and any other scripts have fully loaded and the documentready event has fired. This is one of the big advantages of using HTC-via-CSS rather than JS as the wrapper for PIE: it can be downloaded asynchronously and can be applied right away, often before any of the page has been rendered, so you don't get any flash of unstyled elements.

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest

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