wow. That's rocking. The only trick would be to build a list of possible
attributes that I cared about and that's all. Wow. Good job.

On 12/15/06, Luke Lutman <[EMAIL PROTECTED]> wrote:

I had to do something similar recently. What I did was overload the css
and curCSS functions in
jQuery to accept an array (of css property names), and return an object
whose toString method
builds the inline css string.

For example:

$('#single').css('font-size'); -> "12px"

$('multi').css(['font-size','line-height']).toString(); -> "font-size:
12px; line-height: normal";

I've packaged it up as a (not very thoroughly tested) plugin here:

http://jquery.lukelutman.com/plugins/css/
http://jquery.lukelutman.com/plugins/css/jquery.css.js

Cheers,
Luke

Yehuda Katz wrote:
> I'm looking for some help in building a plugin that would get the
> computed styles of an element and build an inline style string for that
> element. I assume it'd be something like looping through
> jQuery(el).css("styleName") and sticking the results together.
>
> Any more specific ideas?
>
> --
> Yehuda Katz
> Web Developer | Wycats Designs
> (ph)  718.877.1325
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> jQuery mailing list
> [email protected]
> http://jquery.com/discuss/


--
zinc Roe Design
www.zincroe.com
(647) 477-6016

_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/




--
Yehuda Katz
Web Developer | Wycats Designs
(ph)  718.877.1325
_______________________________________________
jQuery mailing list
[email protected]
http://jquery.com/discuss/

Reply via email to