I want to set title text of a link calling a function which receives as parameter the id of the element and outputs the text.
something like
$(a).attr('title', function() {return $(this).id + "foo"});
but a construct like this doesn’t exist as far I know. What can I do?
Thanks.
Use
$(this).attr('id')orthis.id. Do not mix them.