title: Create element with custom HTML attributes in Jquery
body: <p>I am trying to generate an anchor with jQuery, using some custom HTML5 attributes to get something like this.</p>
  
  <pre><code>$('&lt;a/&gt;', {href : "#local_anchor",text: "DUMMY_TOKEN", onClick:"remote_function('token')"}).attr("data-toggle", "modal")
  </code></pre>
  
  <p>If i use this code it works just fine.</p>
  
  <pre><code>$('&lt;a/&gt;', {
     href : "#local_anchor",
     text: "DUMMY_TOKEN",
     onClick:"remote_function('token')"
  }).attr("data-toggle", "modal")
  </code></pre>
  
  <p>But i would like to pass data-toggle as an parameter along the first href, text, etc. 
  When i try to do that i get an Syntax Error.</p>
  
  <p>I also tried to use .data() but i couldn't set the value in the markup, only in DOM.</p>