Closed bblue closed 10 years ago
Never mind, I found a way. Ugly, but it works.
$('a.ajax').on('click', function() {
$(this).closest('.dropdown').addClass('keep-open');
});
$('.dropdown').on({
"hide.bs.dropdown": function() { return (!$(this).hasClass('keep-open')); }
});
$(document).on("eldarion-ajax:complete", function(evt, $el, jqXHR, textStatus) {
$el.closest('.dropdown.keep-open').removeClass('keep-open');
});
I am successfully using eldarion to load data from the server, but I have an issue where I have an ajax link within a dropdown menu.
Every single "normal" workaround I have found stops the event to bubble up on click, hence the eldarion ajax calls never happen.
How can I stop my dropdown menu from closing (using bootstrap), and still have eldarion do its magic?