I have a set of paper buttons like below:
<div><paper-button id="100" on-tap="addQuantity">100ML</paper-button><paper-button toggles id="200" on-click="addQuantity">200ML</paper-button><paper-button toggles id="300" on-click="addQuantity">300ML</paper-button></div>
addQuantity:function(e)
{
console.log(e.target.id);
}
How to solve this?
Try this -
addQuantity: function (e) {
var button = Polymer.dom(e).localTarget;
console.log(button.id);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With