title: jQuery create a with href attribute
body: <p>I just faced a very serious issue with jQuery. I wanted to create an element using jQ. Like the regular way I tried: <code>jQuery('&lt;a href="http://www.google.com"&gt;&lt;/a&gt;');</code></p>
  
  <p>But this does <strong>not</strong> work. So I tried several different element types and attributes. It turned out that I am not able to create elements with HTML containing <code>href=""</code>.</p>
  
  <ul>
  <li><code>jQuery('&lt;a id="id5" name="link"&gt;&lt;/a&gt;');</code> will work</li>
  <li><code>jQuery('&lt;a id="id5" name="link" href=""&gt;&lt;/a&gt;');</code> will <strong>not</strong> work.</li>
  </ul>
  
  <p>Is there any know issue or workaround for this problem?? Thanks in advice…</p>
  
  <p><strong><em>EDIT:</em></strong></p>
  
  <p>To clarify: I don't want to create an element using known attributes. I have a function that returns a ready HTML code. I want to use this code to extract the image tag and then get its attributes. I don't know if the returned HTML will be the same structure. I just know that it contains an image tag. Here is the code I used before:</p>
  
  <pre><code>jQuery(html).find('img:first').attr('class').match(/\image-(\d+)\b/)[1]
  </code></pre>