Can anyone tell me how I can get all the values on a specific attribute value on each loop ? I’m trying to get all the values on each loop with the specific attribute ( data-product ) in this case..
This is my code
<script>
jQuery( document ).ready(function() {
$(".compare-main .compare-products").each(function(){
$(this).each(function(){
console.log($(this).html());
})
});
});
</script>