Bootstrap 3 - Modal Hidden

by Kyle Mitofsky

HTML

<link rel="stylesheet" href="http://getbootstrap.com/dist/css/bootstrap.css">
<script src="http://getbootstrap.com/dist/js/bootstrap.js"></script>
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css">
<!-- Button trigger modal -->
<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#addD">
  Launch demo modal
</button>

<div id="addD" class="modal fade" tabindex="-1" role="dialog" 
      aria-labelledby="addPatientLabel" aria-hidden="true">
    <div class="modal-dialog">
    <div class="modal-content">
    <div class="modal-header">
        <button type="button" class="close" 
                data-dismiss="modal" aria-hidden="true">Ă—</button>
        <h3 id="addLabel">Create</h3>
    </div>
              
    <div class="modal-body">
        <p class="validateTips"></p>
        <table>
            <tr>
                <td class="TemplateLabel">
                    Name:
                </td>
                <td align="left">
                    <input placeholder="name" type="text" name="Name" 
                    data-bind="value: NewP.Name" id="SignUpName" 
                    class="SignUp text ui-widget-content ui-corner-all" />
                </td>
            </tr>
        </table>
    </div>
              
    <div class="modal-footer">
        <button class="btn" data-dismiss="modal" aria-hidden="true">
            Close
        </button>
        <button class="btn btn-primary" onclick="SaveD()">
            Save changes
        </button>
    </div>
    </div>
    </div>
</div>

















<!-- Post Info -->
<div style='position:fixed;bottom:0;left:0;    
            background:lightgray;width:100%;'>
    About this SO Question: <a href='http://stackoverflow.com/q/24868808/1366033'>Hide event of bootstrap modal not being fired</a><br/>
    Fork This Skeleton Here: <a href='http://jsfiddle.net/KyleMit/kcpma/'>Bootstrap 3 Skeleton</a><br/>
<div>

JavaScript

$(function () {
    $('#addD').on("hidden.bs.modal", function () {
        alert("blah");
    });
});