Buttons minus and plus in input :http://www.bootply.com/ZnFpCtZhOa
<div class="xxx" data-name="quantity" data-value="2" data-id="80"></div>
how can i get value from div tag?
Buttons minus and plus in input :http://www.bootply.com/ZnFpCtZhOa
<div class="xxx" data-name="quantity" data-value="2" data-id="80"></div>
how can i get value from div tag?
Try
$('.xxx').change(function(){
alert($(".xxx input").val());
});
add separate class for each spinner
or This is best solution for you
$('.xxx').change(function(){
alert($(this).find( "input" ).val());
});
I hope this is what you are looking for
You can use .attr()
method in JQuery.
$('div').filter(function(){
alert($(this).attr('data-name'));
});
Js fiddle Demo : Click here