how to toggle modal in js code example Example 1: open modal in jqwuery $("#myModal").modal('show') Example 2: open modal in jqwuery $("#myModal").modal()