This does not work when there are multiple title-attribute to add extra content, the original title from the first title element stay in the other tiltes.
On 11 Aug., 07:18, Paul Collins <pauldcoll...@gmail.com> wrote: > Thanks for your help guys, that worked a treat. > You're right Liam, that was my bad, there was no "add" there, I meant > "attr", which was the wrong code anyways... > > Cheers again > Paul > > 2009/8/11 anurag pal <mail.anurag....@gmail.com> > > > > > Hi, > > > Use prepend method. > > > Regards, > > Anurag Pal > > > On Tue, Aug 11, 2009 at 3:15 PM, Paul Collins <pauldcoll...@gmail.com>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