Is this the correct way to set an id for an element that doesn't have an id yet in jQuery?
<pre><code>$("a[href*='http://www.google.com']").attr('id','newId');
</code></pre>

<p>Can only reference it by <code>href</code>.</p>
