Hi guys,

i wrote the following code:

                        var x = jQuery(id);
                        var a = x.data("styles");
                        var t1, t2;
                        if (a.length <= 0)
                                return;
                        for(var i = 0; i < a.length; i++) {
                                t1 = a[i].style;
                                t2 = a[i].value;
                                x.css( t1, t2);
                        }

but it adds the style-stuff with missing dashes like textalign
(instead of text-align) or so. I tried to replace normal dashes with
double dashes so it adds it correctly but ie doesnt render use it
then.

a looks like this:
{
        "text-align" : "center",
        "background-color" : "rgb(99,99,99)",
        ...
}

id is an TD-Element.

i'm doing that because i want to save the style information in the
data of the given element and not just in the style-attribute.

btw: it works fine in firefox

thanks

Reply via email to