title: jQuery Remove style attributes from ALL elements
body: <p>I know how to remove attribute from a single element, there are already some posts about that:</p>
  
  <pre><code>$("div.preview").removeAttr("style");
  </code></pre>
  
  <p>This is html code:</p>
  
  <pre><code>&lt;div class="preview" style="background-color:white"&gt;
     &lt;p&gt;Some text&lt;span style="font-size:15px;"&gt;some text&lt;/span&gt;&lt;/p&gt;
     some more code
  &lt;/div&gt;
  </code></pre>
  
  <p>The problem is that this will remove style attribute only from preview div. I want to remove from all elements inside that div. This is just as example, in real scenario there will be more extensive html.</p>
  
  <p>Is there any short way to do that?</p>
  
  <p>UPDATE:
  Great, I know now how to do it. But what if html is sent to function as string stored in variable. So instead of </p>
  
  <pre><code>$("div.preview") 
  </code></pre>
  
  <p>I have </p>
  
  <pre><code>var string = '&lt;div class="preview"&gt;&lt;p style='font-size:15px;'&gt;....&lt;/p&gt;&lt;div&gt;'
  </code></pre>
  
  <p>Is there any way saying something like that the below?</p>
  
  <pre><code>$(string).find(*).removeAttr("style");
  </code></pre>