Hi i'm learning prototype and i need to know something...
Someone knows how to write and get the value of some atribute... i
mean like...jquery that uses $('#sub-div').atrr('alt','visible);
in prototype is there something like that?...
I hope you can help me and thanks :D
on 2008-07-05 06:53
on 2008-07-05 07:43
Zell 写é“: > > Get some element: id='sub-div' => $('sub-div') class='test' => $$('.test')[0] get attribute => $('sub-div').readAttribute('attr') set attribute => $('sub-div').setAttribute('attr', 'test')
on 2008-07-05 10:08
Hi Zell, Welcome! Hope you find Prototype useful. The best thing you can do when learning Prototype, in my view, is spend an hour or two reading the API docs. [1] Prototype's API isn't so big that you can't read the entire thing all the way through, and doing that will save you a LOT of time in the long run. [1] http://www.prototypejs.org/api Hope this helps, -- T.J. Crowder tj / crowder software / com