Forums
View unanswered posts | View active topics It is currently Fri Oct 24, 2014 6:02 am



Reply to topic  [ 3 posts ] 
 change PIE properties in javascript dynamically 
Author Message

Joined: Tue Jun 05, 2012 6:55 pm
Posts: 2
Post change PIE properties in javascript dynamically
Is it possible to change PIE attributes dynamically in javascript through accessing css style object
like we can change border-width
document.styleSheets[0].rules[0].style['borderWidth'] = "2px";
same is it possible for PIE attributes like
document.styleSheets[0].rules[0].style['PieBorderRadius'] = "20px 2px 20px 2px";
but pie attributes are not loading in style array in IE. I am using pie.htc
Thanks


Tue Jun 05, 2012 7:09 pm
Profile

Joined: Wed Jul 14, 2010 11:46 am
Posts: 1446
Post Re: change PIE properties in javascript dynamically
Yes and no:

1) You can modify the stylesheet rules like your snippets, however PIE has no way to be automatically notified of those changes. You would have to trigger a property change on the targeted element(s) for PIE to react to the change. Something simple like element.className += ' ' should be enough to trigger an update.

2) If you change element styles directly instead of modifying the stylesheet, like element.style.borderRadius = '2px', then PIE will react to that automatically.


Tue Jun 05, 2012 7:30 pm
Profile

Joined: Tue Jun 05, 2012 6:55 pm
Posts: 2
Post Re: change PIE properties in javascript dynamically
Got it, thank you.


Wed Jun 06, 2012 5:01 am
Profile
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.