title: Define hyphenated attribute with jQuery?
body: <p>I'm making a test app using jQuery mobile and Phonegap.
  I have the following page:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
      &lt;title&gt;jQuery Mobile: Theme Download&lt;/title&gt;
      &lt;script src="cordova-2.5.0.js"&gt;&lt;/script&gt;
      &lt;link rel="stylesheet" href="Longmont.min.css" /&gt;
      &lt;link rel="stylesheet" href="jquery.mobile.structure-1.3.0.css"&gt;
      &lt;script src="jquery.js"&gt;&lt;/script&gt;
      &lt;script src="jquery.mobile.js"&gt;&lt;/script&gt;
      &lt;script&gt;
          document.addEventListener("deviceready", onDeviceReady, false);
  
          function onDeviceReady() {
              setTimeout(function() {
                         navigator.splashscreen.hide();
                         }, 500);
          }
      &lt;/script&gt;
      &lt;script&gt;
      $(document).ready(function() {
          $.getJSON('http://localhost/api.php', {'id':3}, function(data) {
              var items = [];
  
              $.each(data, function(key, val) {
                  items.push('&lt;div data-role="collapsible"&gt;&lt;h1&gt;' + val + '&lt;/h1&gt;&lt;/div&gt;');
              });
  
              $('&lt;div/&gt;', {
                  data-role: 'collapsible-set',
                  html: items.join('')
              }).appendTo('#page');
  
          });
      });
      &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;div data-role="page" id="page"&gt;
      &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>I'm trying to put the items array into a div with the <code>data-role</code> set to <code>collapsible-content</code>.
  So, I edit the attribute when creating it (in <code>$('&lt;div/&gt;', {</code>). However, this attribute is hyphenated, and when I try this code in the simulator it displays a blank page.</p>
  
  <p>What is the proper way to represent a hyphenated attribute in jQuery?</p>