have jQuery ignore case in attribute/data names?
We're using HTML5's data-* attributes for some of our client side interaction set up. jQuery uses these to do its thing. The catch is that the HTML coming in may vary. Obviously this is the problem that should be fixed but I'm not always in control of the HTML being produced, unfortunately. The question: Given these two tags: <a data-sampleAttributeName="example"> <a data-sampleattributename="example"> Is there a clever way to treat them as one and the same? The best I've come up with is something like this: var theAttribute = ($myobject).data('sampleAttributeName'); if (($myobject).data(