show modal in jquery code example

Example 1: onclick open modal jquery

$('#myModal').modal('toggle');
$('#myModal').modal('show');
$('#myModal').modal('hide');

Example 2: jquery on modal show

$(window).on('shown.bs.modal', function() { 
    $('#code').modal('show');
    alert('shown');
});

Example 3: modal show jquery event





$("#phoneEdit").on('shown.bs.modal', function(e){
        console.log('enter here');
     
     	// do anything after the modal open
        $(".number_six").val("");
    });

Example 4: how to make popup modal in jquery with example

$("#sticky").modal({
  escapeClose: false,
  clickClose: false,
  showClose: false
});

Tags:

Misc Example