I made a custom attribute to add a title to each links.
<a href="#" nameOf="The Flower" id="ex1"></a>
<a href="#" nameOf="The Tree" id="ex2"></a>
And here is the jQuery code
$('#ex1,#ex2').append('<span class="title">'+$(this).attr("nameOf")+'</span>');
But the link displays as undefined. How can I fix this.