how to target modal to javascript function code example Example: open bootstrap modal with javascript $("#myModal").modal()