title: Issues with camel case using JQuery with data- attribute
body: <p>I had this code working all right, until I transitioned from "_" to camel case. Here is the code:</p>
  
  <pre><code>//Selecting the form id
  formSelector = "#" + formId; 
  
  //Selecting all input/select/textarea fields with data- attributes
  elementSelector = formSelector + " input[data-errArrow], " + 
    formSelector + "      select[data-errArrow],     " + formSelector 
    +  " textarea[data-errArrow]";
  
  //For each selected element...
  $(elementSelector).each(function(index,element) {
    console.log($(this).prop("tagName"));
    console.log($(this).attr("data-errArrow"));
    console.log($(this).data("errArrow"));
    ...
   }
  </code></pre>
  
  <p>The console output is:</p>
  
  <pre><code>INPUT
  mylib.js:25 R
  mylib.js:26 undefined
  </code></pre>
  
  <p>If data-errArrow attribute's value is correctly displayed as "R", should .data of that element not also show the same result? Why is it undefined. There is some discussion <a href="https://api.jquery.com/data/" rel="nofollow">here</a> on camel case in the JQuery docs related to the data- attribute. It says:</p>
  
  <p>"In case no data is stored with the passed key, jQuery searches among the attributes of the element, converting a camel-cased string into a dashed string and then prepending data- to the result. So, the string lastValue is converted to data-last-value."</p>
  
  <p>I do not see how this could be applicable above. I need to fix this. I want .data to return 'R' in the example.</p>