How to remove attributes at a time using jquery
<p>$('#myImage').removeAttr('class').removeAttr('style').removeAttr('border');</p>

<p>That one works just fine but is there a way to remove a set of attributes from an element?</p>

<p>I altered the code a bit, like</p>

<pre><code>$.fn.removeAttrs = function () {
    // Convert all passed arguments to an array
    var args = arguments[0].split(' '),
        attr;

    // Loop, removing the first array item on each iteration
    while (attr = args.shift())
        this.removeAttr(attr);

    // Return the jQuery object for chaining
    return this;
}
</code></pre>

<p>call it like below </p>

<pre><code>$('#myImage').removeAttrs('class style border');
</code></pre>
