My function Event.observe(n,"click",respondClick) execute respondClick ON click.
But I need to execute respondclick AFTER click
I need to get height of my div AFTER I clicked. But this function get the height of my div instantaneously.
Is it possible ?
Event.observe(n, 'click', function(e){
var height = $("hello").getHeight();
alert(height);
});
I’m not sure I understand what you mean by
after. Could you use themouseupevent, which is fired when the user releases the mouse button?You could
setTimeout, and run the function a short time after the user has clicked. IfresponseClickchanges the UI this would make the page feel sluggish though.