Reputation: 177
I have a problem with getting innerHTML
from object that looks like this:
<a class="trackable-user" href="/blame.fic">
<i class="icon-user"></i>
#BlameFic
</a>
Got this object by typing $("ul#userDropDown li:eq(2) a")
. So my question is what do I need to add to my selector to get #BlameFic from the object that I mentioned.
Upvotes: 0
Views: 39
Reputation: 11
What tymeJV is correct. Use text() to get the value. Here is just another variation:
<script>
$(document).ready(function() {
var track = $("a.trackable-user").text();
});
</script>
Upvotes: 1