Hi eveyone,

I'm using .addClassName and .setStyle to change body background. But
my code doesn't work very well right now so I need to swich just
to .setStyle . My question is: will .setStyle overwrite my existing
style?

Example:

Button 1 uses:
 $$('body')[0].setStyle({background: 'url(someimage1.png) center
center no-repeat;'});

Button 2 uses:
 $$('body')[0].setStyle({background: 'url(someimage2.png) center
center no-repeat;'});

So will this second command overwrite the existing style? If not - is
there any way how to remove style? I know you can do it
with .addClasName and .removeClassName, but I can't use them because
my bg image path changes every time.

Thanks for help.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to