I am trying to set a variable in jQuery. The value is supposed to be set on the click event of the button. The onclick event fires but the x10Device variable remains undefined
.
I am on jquery 1.7.1.
jQuery:
$x10Device = $(this).data("X10");
HTML:
<button class="toggleStatus" data-X10="C5">
I can't see what's wrong.