I have 2 event handlers:
Y.all(".ptl").on("mouseover", handleOverlay);
Y.all(".ptl").on("mouseout", handleOverlay);
And I would like to pass an arugment to handleOverlay
on mouseout so that the function knows that the user has exited the node and to exit the handleOverlay
function.
I have attemped to follow the API http://developer.yahoo.com/yui/3/api/YUI.html#method_on which to me indicates that it should be:
Y.all(".ptl").on("mouseout", handleOverlay, null, null, null, {arg: "myarg});
however in handleOverlay
, assuming that the first argument is the node, the second argument is undefined, prior to the on method, and then null after instead of containing the object passed to it.
function handleOverlay(node, te) {}
node = node object in question (as expected)
te = undefined prior to the mouseover, and null after the mouseout.
I'm sure I'm missing something simple, Thanks.