title: Clone div and remove class without changing the original one
body: <p>I want to clone the content of the div using jQuery, but from the copied content I want to remove the class from the original one before I use appendTo function. When I remove the class from a clone they also remove from the original one.</p>
  
  <p>My code is:</p>
  
  <pre><code>$('.carousel .item').each(function(){
          var next = $(this).next();
  
          if (!next.length) {
              next = $(this).siblings(':first');
          }
          next.children(':first-child').clone().appendTo($(this));
          next.children(':first-child').addClass('col-sm-offset-1');
  
          for (var i=0;i&lt;3;i++) {
              next=next.next();
              if (!next.length) {
                  next = $(this).siblings(':first');
              }
              next.children(':first-child').clone().appendTo($(this));                 
          }
  
  });
  </code></pre>
  
  <p>Please note, I don't want to remove class from actual div from where I copied the content, I just want to remove it from the copied code so that it is not included in the cloned div.</p>