I have this markup,
<a href="http://www.example.com">Hiya<span class="delete">Delete</span></a>
And my js,
$('.delete').click(function() {
window.location = 'http://www.example.com/example';
});
My problem the anchor tag always win presedence over my javascript window.location how can I overcome this?
Thanks
You need to return false from the
click()event to prevent the default behaviour: