Uikit: How do you pass options to a UIkit modal through javascript?

Created on 26 May 2016  路  3Comments  路  Source: uikit/uikit

HTML:
<div id="myModal" class="uk-modal"> <div class="uk-modal-dialog"> <p>hello</p> </div> </div>

Javascript:
UIkit.modal("#myModal").show();

How would you pass multiple options like keyboard: false, modal: false etc while initiating the modal through js

Most helpful comment

After wasting hours I finally got it to work

UIkit.modal('#myModal', {modal: false, keyboard: false, bgclose: false, center: true}).show();

For God's sake would you mind adding it to the Modal Documentation

All 3 comments

After wasting hours I finally got it to work

UIkit.modal('#myModal', {modal: false, keyboard: false, bgclose: false, center: true}).show();

For God's sake would you mind adding it to the Modal Documentation

I agree, the documentation should be more complete.

I agree, the documentation should be more complete.

Documentation? UIKit 2's documentation is little more than an FAQ.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

agreif picture agreif  路  3Comments

kirlat picture kirlat  路  3Comments

eric-22 picture eric-22  路  3Comments

papazetis picture papazetis  路  3Comments

AntoninJarolim picture AntoninJarolim  路  3Comments