1 2 3 4 5 6
jQuery.fn.extend({ // copies an object and removes 'id' and 'class' values copy: function() { return this.clone().removeAttr("id").removeAttr("class"); } });