> -------Original Message------- > From: Sam Collett <[EMAIL PROTECTED]> > Subject: Re: [jQuery] How to convert "class" to "style='attrs ...'" > Sent: Mar 15 '07 17:06 > > On 15/03/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, > > > > I'm trying to write a function to generate MySpace friendly HTML. MySpace > does not accept "link" tags, so the HTML from my page that contains > "class='whatever'", will mean nothing on the mySpace page. > > > > My question is, given an element with a class, e.g. "<td > class='myClass'>Hello</td>", how would I use jQuery to rewrite that element > as "<td style='font-family:verdana;font-size:12px;...>Hello</td>"? Notice I > have replaced the "class" attribute with a style attribute with all the > attributes listed out. > > > > Thanks, - Dave > > Can't you use <style>? > > <style type="text/css"> > @import "http://example.com/style.css"; > </style> >
Sadly, no. They filter out the "@import" tag. - Dave _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
