[jQuery] Re: Add extra content to the title attribute

2009-08-18 Thread Glödu
This does not work when there are multiple title-attribute to add, there it is only from the first title element transferred. On 11 Aug., 07:18, Paul Collins 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",

[jQuery] Re: Add extra content to the title attribute

2009-08-18 Thread Glödu
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 wrote: > Thanks for your help guys, that worked a treat. > You're right Liam, that was my bad, there was no "

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Paul Collins
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 > Hi, > > Use prepend method. > > Regards, > Anurag Pal > > > On Tue, Aug 11, 2009 at 3:15 PM

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread anurag pal
Hi, Use prepend method. Regards, Anurag Pal On Tue, Aug 11, 2009 at 3:15 PM, 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 t

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Peter Edwards
try this: $("a.newWindow").attr("title", $("a.newWindow").attr("title")+" - This link will open in a new window"); On Tue, Aug 11, 2009 at 10:45 AM, 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 JQuer

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Liam Byrne
Paul Collins wrote: > I'm using the "add" JQuery command, > $("a.newWindow").attr("title", " - This link will open in a new window"); I can't see any "add" there ? The proper code would be $("a.newWindow").attr("title",$(this).attr("title")+" - This link will open in a new window"); L Pau

[jQuery] Re: Add extra content to the title attribute

2009-08-11 Thread Liam Potter
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 JQ