Closed evilmango closed 11 years ago
The bootstrap-ajax:success event is not triggered when data-replace or fragments replaces $el.
bootstrap-ajax:success
data-replace
fragments
$el
e.g.
// this listener is never called $('body').on('bootstrap-ajax:success', function() { console.log('bootstrap-ajax:success triggered'); });
<div id="my_div"> <a href="/some/ajax/handler" class="ajax" data-replace="#my_div">Hit me</a> </div>
I noticed issue 24 (Triggering of success and error events) https://github.com/eldarion/bootstrap-ajax/issues/24 changed the behaviour to trigger on the element itself.
I'm not sure what the solution is here. Perhaps to trigger on the document if the element has been removed from the DOM?
@evilmango this should be resolved now that the event is triggered before the processing.
The
bootstrap-ajax:success
event is not triggered whendata-replace
orfragments
replaces$el
.e.g.
I noticed issue 24 (Triggering of success and error events) https://github.com/eldarion/bootstrap-ajax/issues/24 changed the behaviour to trigger on the element itself.
I'm not sure what the solution is here. Perhaps to trigger on the document if the element has been removed from the DOM?