need to get a data attribute value from a clicked DIV and pass it as data attr for a displaying new DIV:
DIVs to select by click:
<div class="mySlot" data-slot-label="a">A</div>
<div class="mySlot" data-slot-label="b">B</div>
<div class="mySlot" data-slot-label="c">C</div>
The popup DIV that carries over the data-slot value on its as its attr:
<div class="selection" data-slot-label="[The Selected DIV data]"></div>
I'm using this now, but not working:
$('.mySlot').click(function() {
var mydata = $('.mySlot').data('slot-label');
$('.selection').data('slot-label',mydata);
});
Cheers