Continue of question Use classes of dynamically loaded html with Jquery
$(".content-white").on('click', ".product", function () {
var id = $(".product").attr('id');
alert(id);
});
How can I get an element with class product to get it's id?
this. To turn the DOM element into a jQuery object that we can use jQuery methods on, we simply do$( this ), often following this idiom:var $this = $( this );"