[Proto-Scripty] Event.element

2010-01-10 Thread bill
The docs say: |Event.element(event) - Element| Returns the DOM element on which the event occurred. But, what is actually returned ? If not the ID, what do I do to get the id of the div in which the click occurred ? -- Bill Drescher william {at} TechServSys {dot} com -- You received

Re: [Proto-Scripty] Event.element

2010-01-10 Thread DJ Mangus
What is returned is the same thing you'd get if you used $('id'). Chain on .identify to get the Id from a DOM node. On Sunday, January 10, 2010, bill will...@techservsys.com wrote: The docs say: Event.element(event) - Element Returns the DOM element on which the event occurred. But,

Re: [Proto-Scripty] Event.element

2010-01-10 Thread bill
DJ Mangus wrote: What is returned is the same thing you'd get if you used $('id'). Chain on .identify to get the Id from a DOM node. Thank you. as in: function clickHander (event) { var id = event.element().identify ? ... -- Bill Drescher william {at} TechServSys {dot} com -- You

Re: [Proto-Scripty] Event.element

2010-01-10 Thread bill
DJ Mangus wrote: What is returned is the same thing you'd get if you used $('id'). Chain on .identify to get the Id from a DOM node. Thank you. as in: function clickHander (event) { var id = event.element().identify ? or rather: function clickHander (event) { var element=

Re: [Proto-Scripty] Event.element

2010-01-10 Thread DJ Mangus
Either should work fine. No need for a variable though. It's what makes prototype so nice. Sent from my phone so please pardon any spelling errors. On Jan 10, 2010, at 11:08 AM, bill will...@techservsys.com wrote: DJ Mangus wrote: What is returned is the same thing you'd get if you used

[Proto-Scripty] event.element vs. $('element_id')

2009-03-26 Thread Dave L
Im wondering, what is the difference between the following: $('object_id').observe('click', function(event){ element = event.element() } VERSUS $('object_id').observe('click', function(event){ element = $('object_id) } Is there a difference in speed? Is one better than the other in