Question: I have a button that toggles a bootstrap modal.

```
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal">

```

I want to do the same thing with a jquery function. Is this possible?

Answer: 
below code worked for me, you can call this function on any event

```
 <script type="text/javascript">
    $(document).ready(function () {
        ShowModel = function () {
            $("#myModal").modal();
        }
    });
</script>

```
Just a simple `$("#myModal").modal()` in any function of your choice