I have a link element (actually, all the links of a certain class) to which I have bound a click event.
Here's an example link element:
<a id="2" class="paginationclick" style="cursor: pointer;" href="">2</a>
And here's the binding:
$(".paginationclick").click(function(e) {
displayAccountSearchResults(e);
if (e.stopPropagation) {
e.stopPropagation();
} else {
e.cancelBubble = true;
}
});
displayAccountSearchResults(e) executes fine but then the page reloads. I do not want the page to reload. Why isn't stopPropagation / cancelBubble working?