and this event-selector rule:
'#container:mouseover' : function(element) {
new Insertion.After($('container'), "Mouse over "+element.id+"<br/>")
}
I would expect the element that gets passed into that function to
always be $('container'), but it's not - I usually get the child
element ( $('innertext') )
Is there any way of getting the element that the rule was originally
applied to?
Change:
observer = function(event) {
var element = Event.element(event);
if (element.nodeType == 3) // Safari Bug (Fixed in Webkit)
element = element.parentNode;
rule.value($(element), event);
}
To:
observer = function(event) {
var eventElement = Event.element(event);
if (eventElement.nodeType == 3) // Safari Bug (Fixed in
Webkit)
eventElement = eventElement.parentNode;
rule.value($(element), event, element);
}
This change adds an optional 3rd parameter "element" which will always be
the element selected by your selector.
Sam
rule.value($(eventElement), event, element);
Sam
thank you ...
you saved my day...
please put this into the normal event:selectors release...
otherwise it is not useable for complex web design...
best regards,
Screech
var element = Event.element(event);
worked great for me. It doesn't appear that it's necessary.