Hi Stefan,
That isn't jQuery's behavior; it's the browser's.
The value "rgb(213, 213, 213)" is just another representation (RGB) of
the light gray, #D5D5D5, which is the hexadecimal representation.
If you want to avoid all the -moz stuff, change "background:#D5D5D5"
to "background-color:#D5D5D5"
Hope that helps.
--Karl
____________
Karl Swedberg
www.englishrules.com
www.learningjquery.com
On Jul 15, 2008, at 5:50 PM, Stefan Petrea wrote:
I want to append to a tag another tag but in the argument
to .append() I
use the characters :;#% because I need them to write colors attributes
to the new tag and some other css things(and I can't code a class for
those because I wouldn't want to use css because I don't know it).
The problem is that jQuery expands my :;#% in the arguemnt
to .append()
So running some code like this:
$("body").append('<a href="#" id="post_comment"
style="background:#D5D5D5">post comment</a>'+"\n");
yields something totally unexpected(to me) like this :
<a href="#" id="post_comment" style="background: rgb(213, 213, 213)
none
repeat scroll 0%; -moz-background-clip: -moz-initial;
-moz-background-origin: -moz-initial; -moz-background-inline-policy:
-moz-initial;">post comment</a>
How should I counter-attack this behaviour of jQuery so that I will be
able to generate exactly what I want without having to use CSS ?
--
Stefan Petrea
homepage : http://perlhobby.googlecode.com/
mobile phone : +40732070179