I'm modifying a site which has modal with UIKit, that's the generic modal and how I open it, in this case, I want to hide the button.
<div id="modal_generic" class="uk-modal generic_modal uk-open" aria-hidden="false" style="display: block; overflow-y: scroll;">
<div class="uk-modal-dialog">
<h4 class="uk-h4">text</h4>
<div class="wrap_buttons_accept_input_file uk-width-1-1">
<a class="uk-button uk-button-link uk-button-small uk-modal-close btn_close_form"">CLOSE</a>
</div>
</div>
</div>
$('#modal_generic').find('h4').text('modal text');
$('#modal_generic .uk-form').hide();
$('.btn_close_form').hide();
$.UIkit.modal('#modal_generic').show();
That's works fine, but this modal can't be hidden, and it happen when clicking outside, I can't find how to do it.
My try:
$('body').click(function(e) {
e.preventDefault();
});
But not working.
How can I do it?