something like this

var origTitle = $("a.newWindow").attr("title");
$("a.newWindow").attr("title", origTitle+" - This link will open in a new window");

Paul Collins wrote:
Hi all,

This is hopefully simple. I have a bunch of links with titles, like TITLE="Facebook" and so on. I am adding JQuery to make the links open in a new window and would like to add some text to the title that says "this link will open in a new window", whilst keeping the original text. I'm using the "add" JQuery command, but this actually replaces the original title text.

$("a.newWindow").attr("title", " - This link will open in a new window");

The end result I would like to have is: title="Facebook - This link will open in a new window".
Could anyone point me in the right direction?!
Cheers


Reply via email to