I want to know how I can get the value of data-id from my div:
<div class="customer-row selected-row" data-id="83BA1B29-15B9-4B11-BA47-DEB453362426"><strong>Mario Rossi</strong></div>
I tried with:
$('#customer-row .selected-row').data('id');
but return undefined, why?
$('.customer-row .selected-row').data('id'). You have got#customer-rowthere in the jquery statement which resolves to nothing.<strong>?