title: How to remove the attribute style of multiple tags using jQuery?
body: <p>this is my problem...I'm trying to copy the code from below this is the code:</p>
  
  <pre><code>    &lt;div class="modalMask" id="ventana_factura_1"&gt;
     &lt;div class="modalContent"&gt;
        &lt;p style="text-align: right; color: red;" class="mini-1"&gt;Folio: 1&lt;/span&gt;&lt;span&gt;Serie: A&lt;/span&gt;&lt;/p&gt;
        &lt;div style="text-align: right;" class="mini-2"&gt;
           &lt;p&gt;Fecha&lt;/p&gt;
           &lt;p&gt;2016-01-14&lt;/p&gt;
        &lt;/div&gt;
        &lt;p class="mini-3"&gt;One name&lt;/p&gt;
        &lt;p class="mini-4"&gt;More data&lt;/p&gt;
        &lt;h2 class="mini-5" style="text-align: center; color: #269FE4;"&gt;FACTURA&lt;/h2&gt;
  
        &lt;div class="div-table mini-6"&gt;
           &lt;div class="div-table-row mini-7"&gt;
              &lt;div class="div-table-col mini-8" align="center" style="width: 70px;"&gt;&lt;b&gt;Cantidad&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-9" style="width: 260px;"&gt;&lt;b&gt;Descripcion&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-10" style="width: 100px;"&gt;&lt;b&gt;Precio unitario&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-11" style="width: 110px;"&gt;&lt;b&gt;Importe&lt;/b&gt;&lt;/div&gt;
           &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="div-table-row mini-12"&gt;
           &lt;div class="div-table-col mini-13" style="width: 70px;"&gt;5&lt;/div&gt;
           &lt;div class="div-table-col mini-14" style="width: 260px;"&gt;This is a description&lt;/div&gt;
           &lt;div class="div-table-col mini-15" style="width: 100px;"&gt;Price&lt;/div&gt;
           &lt;div class="div-table-col mini-16" style="width: 110px;"&gt;100&lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and I'm copying the code with <code>var factura = $('#ventana_factura_1).html();</code> and then assign the content to another div <code>$('#newdiv').html(factura)</code> and it is working but I would like to remove the attribute style of every tag to just leave in each tag the attribute "class" and its value...something like this:</p>
  
  <pre><code>&lt;div class="modalMask" id="ventana_factura_1"&gt;
     &lt;div class="modalContent"&gt;
        &lt;p class="mini-1"&gt;Folio: 1&lt;/span&gt;&lt;span&gt;Serie: A&lt;/span&gt;&lt;/p&gt;
        &lt;div class="mini-2"&gt;
           &lt;p&gt;Fecha&lt;/p&gt;
           &lt;p&gt;2016-01-14&lt;/p&gt;
        &lt;/div&gt;
        &lt;p class="mini-3"&gt;One name&lt;/p&gt;
        &lt;p class="mini-4"&gt;More data&lt;/p&gt;
        &lt;h2 class="mini-5"&gt;FACTURA&lt;/h2&gt;
  
        &lt;div class="div-table mini-6"&gt;
           &lt;div class="div-table-row mini-7"&gt;
              &lt;div class="div-table-col mini-8" align="center"&gt;&lt;b&gt;Cantidad&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-9"&gt;&lt;b&gt;Descripcion&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-10"&gt;&lt;b&gt;Precio unitario&lt;/b&gt;&lt;/div&gt;
              &lt;div class="div-table-col mini-11"&gt;&lt;b&gt;Importe&lt;/b&gt;&lt;/div&gt;
           &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="div-table-row mini-12"&gt;
           &lt;div class="div-table-col mini-13"&gt;5&lt;/div&gt;
           &lt;div class="div-table-col mini-14"&gt;This is a description&lt;/div&gt;
           &lt;div class="div-table-col mini-15"&gt;Price&lt;/div&gt;
           &lt;div class="div-table-col mini-16"&gt;100&lt;/div&gt;
        &lt;/div&gt;
     &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It's this possible? and how could I do this?, thanks.</p>