The DOM is something like this:
<h3 class="iw"><span email="noreply@updates.com" name="test.com" class="gD">test.com</span></h3>
Now I want to get the email attribute of the span.
I tried following in console log.
console.log($(".iw span:first-child"));
I get the complete inner span element and its other line as undefined on the console.
Now if I try following on console log,
console.log($(".iw span:first-child").attr("email"));
It starts giving me this error:
Uncaught TypeError: $(...).attr is not a function(…)
It gives the same error for any jQuery method that I may use after that.
How can I fix this problem?