title: Copying CSS to inline using jquery (or retaining formatting when copying stuff from a web page)
body: <p>I could probably muddle through the code for this, but before I do I thought I'd ask if there's a quick and/or built-in way or plugin for this...</p>
  
  <p>Given a table with a css class applied to it, the class definition being in an external style sheet (with styles applied to th, tr, and td) I want to move OR copy that css to the style attribute of the tags themselves.   In other words I want to make the CSS inline.</p>
  
  <p>Reason:  People who use these pages sometimes copy and paste the tables into emails.  If they do this on a table with externally-sourced CSS the pasted table has lost all formatting. If the css is inline the formatting is retained.</p>
  
  <p>I have already done this in a rough-and-ready way by simply applying duplicated css to the table using <code>$().css();</code> function,  but this is not ideal. If I ever changed the css in the style sheet I'd also have to change the CSS in this part on every single page that has this style of table  </p>
  
  <p>Something like <code>$('.mytable').makeCSSInline();</code>  would be an ideal function - if it existed :)</p>
  
  <p>edit:  Just for clarification:  I don't think the copy/paste will retain the css if it's in an internal style sheet (copied using the .load function).. It has to be fully inline (in the style attribute of each tag that has a style associated with it).</p>
  
  <p>Also,  I'm copying from firefox to outlook (so from non-microsoft to microsoft)</p>