10-03-2018, 02:37 AM
HI,
I've run into similar issues myself in the past and the solution for me was to use event.stopImmediatePropagation() function
Here is the link to this function: https://developer.mozilla.org/en-US/docs...ropagation
And here is an example implementation from one of my projects
I've run into similar issues myself in the past and the solution for me was to use event.stopImmediatePropagation() function
Here is the link to this function: https://developer.mozilla.org/en-US/docs...ropagation
And here is an example implementation from one of my projects
PHP Code:
$('#submitbtn').on('click', function (el) {
var formDAta = $('#tagform').serialize();
$.ajax({
url: '<?= site_url('tags/saveTags/entities/' . $id) ?>',
method: 'POST',
data: formDAta,
success: function (data) {
$('.collapse').toggle('toggle');
}
});
// stop from calling this multiple times
el.stopImmediatePropagation();
return false;
});