launchpad-dev team mailing list archive
-
launchpad-dev team
-
Mailing list archive
-
Message #05339
Re: YUI 101 question
On Thu, 28 Oct 2010 15:29:31 Ian Booth wrote:
> Hello YUI gurus
>
> Why can't I set the title on a YUI anchor object directly?
>
> ie
>
> link = Y.getElementById(...)
> link.title = "my title"
>
> fails (well, no error but doesn't work), but
>
> link.setAttribute('title', "my title");
>
> works.
>
> Any enlightenment for a YUI noob?
Because it is the YUI way? I think you get a Node object back.
Also, I think you shouldn't be using getElementById. Why not use the YUI
sector using the id?
Tim
Follow ups
References