I use facebox plugin on certain links.
I want to disable some of the links dynamically. so clicking them will not open facebox.
I tried several ways to do it but none of them seem to work. Facebox still works when clicking on the links.
I even tried this (prevent the click and mouse down events) but it still doesn't disable the facebox from popping up.
$('#who_button').click(function(event) { event.preventDefault();});
$('#who_button').mousedown(function(event) { event.preventDefault();});
What can I do?
EDIT:
Following brad and PetersenDidIt advice I tried this:
$('#who_button').click(function(event) { alert ('here');event.stopPropagation(); event.stopImmediatePropagation();});
$('#who_button').mousedown(function(event) { event.stopPropagation(); event.stopImmediatePropagation();});
AND still no luck. Moreover I see that the facebox frame appears under the alert dialog. which means that facebox starts before my click/mousedown events are even called.
Is it possible to attach event which will occur before all other events?
Perhaps facebox uses another event (not click or mousedown). what can it be?