Когда я нажимаю на следующую ссылку внутри внешнего div, я получаю оператор confirm
, но после нажатия «ОК» ничего не происходит.
HTML:
<div onclick="toggleExerciseDetails($(this),true)" class="clickable">
...
<a target="_blank" href="http://iPUMPit.local/exercises/delete/275"
onclick="cancelPropagation(event);return confirm('Are you sure you want to delete this exercise?');"
title="Delete this exercise" class="icon icon_delete"></a>
</div>
JavaScript:
// cancels propagation of an event to the outer element event
function cancelPropagation(e) {
if (!e)
var e = window.event;
e.cancelBubble = true;
if (e.stopPropagation) e.stopPropagation();
}
Почему мой клик не следует за URL?
Спасибо:)