I need to be able to open a Twitter bootstrap modal window using the onClick=""
or similar function. Just need the code to go into the onClick=""
. I am trying to make a click-able div
to open the modal.
Code Excerpts:
Div Code:
<div class="span4 proj-div" onClick="open('GSCCModal');">
Modal Div Code:
<div id="GSCCModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
Javascript:
function open(x){
$(x).modal('show');
}