Hi,
I have a div and I'd like to set its background image style using the
"object" format.
I tried without success the following things:
$('mydiv').setStyle({'backgroundImage':'wait.gif'});
$('mydiv').setStyle({'backgroundImage':'url(wait.gif)'});
$('mydiv').setStyle({'background-image':'wait.gif'});
$('mydiv').setStyle({'background-image':'url(wait.gif)'});
It doesn't rise any error but doesn't set the background either.
The only working way I found until now is using the string format
parameter.
This one works:
$('mydiv').setStyle('background-image:url(wait.gif);'});
I really would like to use the object form, which is working for other
style properties on the very same object.
(ex: $('mydiv').setStyle({'left':xpos+'px','top':ypos+'px'}); )
Am I missing something here?
Thanks for any hint.
Eric
--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---