// .each() HAS PARAMETERS. $('span').each(function (index, element) { console.log(element.className + ' ' + element.tagName + ' ' + element.innerHTML); });