According to the Ulkit css documentation for displaying a modal window we have:
<button uk-toggle="target: #my-id" type="button"></button>
<!-- This is the modal -->
<div id="my-id" uk-modal>
<div class="uk-modal-dialog uk-modal-body">
<h2 class="uk-modal-title"></h2>
<button class="uk-modal-close" type="button"></button>
</div>
</div>
A button is required to trigger the mode. How would I do to display the modal without the need for a button. In case it would be inside a javascript function and depending on the result of an IF, I want to call the modal. Example:
if(meuValor > 1){
UIkit.modal("my-id").show();
}
While doing so the system returns me = "Can not read property 'show' of undefined"
What would be the way to call this modal?