MyBB Community Forums

Full Version: JQuery function in Prototype?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
As I can use the function or something akin to preventDefault(); in Prototype when you click on a link?

For what I read or something like is used:

Event.stop();

Thanks in advance.
Event.stop(event) should do the trick.
(2012-10-09, 11:25 AM)euantor Wrote: [ -> ]Event.stop(event) should do the trick.

But what is the "event"?
Take this snippet for an example:

Event.observe('unreadAlerts_menu', 'click', function(e) {
	Event.stop(e);
	var popup_id = e.target.identify() + '_popup';
	Effect.toggle(popup_id, 'blind');
});

"e" is the actual event you wish to stop.
Thanks I try it and then commentedBig Grin I'm developing my first plugin:p