SetAttribute doesn't work in IE7
<p>I'm using jQuery 1.6.1 and the <code>attr()</code> method, It's working fine on all browsers except IE7.</p>

<p>In the console, It highlights the setAttribute function in jQuery JS and says: <strong>Not Implemented</strong></p>

<p>I think IE7 doesn't support that, so i tried to work around it: </p>

<pre><code>if(Object.prototype.hasOwnProperty('setAttribute')){
  $(e).attr(key, value);
}else{
  e[key] = value;
}
</code></pre>

<p>It's still telling me:</p>

<p><strong>Object doesn't support this action</strong></p>

<p>What's the solution for this?</p>
