mercredi 17 août 2016

How to use bootstrap modal in conditions in JavaScript function

how can I implement bootstrap modal window to decide condition in javascript function, For example, I had created BS modal by BS Docs with "Yes" and "No" buttons, and js function:

function myFunction () {
    var modal = $("#myModal").show();

    if (modal.userOption == yes) { //do something }
    else { //end function }
}

Is possible anything like that? Thanks

Aucun commentaire:

Enregistrer un commentaire