title: How to get data attribute in javascript -- not working on ios safari browser
body: <p>I'm unsuccessful at extracting a data attribute using javascript jQuery code running under ios safari (on my iPad).  The code I have works fine on desktop browsers.  </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;div id="mydiv" data-mine="test"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Javascript (jQuery)</p>
  
  <pre><code>console.log($('#mydiv').data("mine"));
  </code></pre>
  
  <p>the log for my ios Safari shows <code>undefined</code> whereas the log for desktop Chrome says <code>test</code> as it should.  I've tried some variations like </p>
  
  <pre><code>console.log($('#mydiv').data().mine);
  </code></pre>
  
  <p>and </p>
  
  <pre><code>console.log($('#mydiv').dataset.mine);
  </code></pre>
  
  <p>but those have not worked any better.</p>