I have this button:
<button type="button" class="themeChanger" data-themeValue="grid" value="Grid">
<img src="templateImages/Icon_200.png" />
</button>
And this jQuery:
$(".themeChanger").click(function () {
alert($(this).attr("data-themeValue"));
alert($(this).data("themeValue"));
});
For some reason the first alert shows "grid" like it should, but the second shows undefined. Is there something stupid I'm missing?