Find attribues in a group of elements and print their values together.
I am trying to find a custom attribute from a group of elemnts and them prints their values together. It doesn't seem to be working for me, it only pring one value. If use alert or console.log, it shows them all. My code looks like below.
- $('.um-member-name').each(function(i, obj) {
- var n = $(this).attr('userEmail');
- $("h2").text(n);
- });
Any Ideas how I can solve this issue?