I have p element on page.
This p has 2 binded clicks (please leave it that way. I know there are other options.)
$('p').click (function (e) {
e.preventDefault(); //<== not helping me as I thought it should
alert('1');
});
//...later on the same page...
$('p').click (function ( ) {
alert('2');
});
I want that the first code will prevent the Second code from executing( NOT VIA FLAGS)
What is the most elegant way of doing this?
in the first function
edit: Demo to show hover is not affected:
http://jsfiddle.net/VEuRu/1/