title: How to get data attribute value of all elements using jquery?
body: <p>How to get data attribute value of all elements using jquery without $.each?</p>
  
  <pre><code>&lt;li class="myclass" data-optionid="2"&gt;&lt;/li&gt;
  &lt;li class="myclass" data-optionid="15"&gt;&lt;/li&gt;
  &lt;li class="myclass" data-optionid="27"&gt;&lt;/li&gt;
  </code></pre>
  
  <p>The result should be: 2, 15, 17</p>
  
  <p>I tried <code>$('.myclass').data('optionid')</code>
  but the result was <code>2</code></p>
  
  <p>Thanks in advance.</p>