javascript - How to detect handlebars-created non-initialized modal closal -


i creating, upon press of button, modal window comes handlebars template. @ document's load, modal window not initialized can't tie event such :

$(".modal").attr("someattr").change(function(){}); 

here code of modal window , hidden button can called show window once it's initialized.

    <script id="informationmodaltemplate" type="text/x-handlebars-template">         <div class="modal fade informationmodal" tabindex="-1" role="dialog" aria-labelledby="mylargemodallabel" aria-hidden="true">             <div class="modal-dialog modal-lg">                 <div class="modal-body">                     <div class="modal-content">                         <div class="modal-header">                             <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>                             <h4 class="modal-title" id="mymodallabel">{{title}}</h4>                         </div>                         <div class="modal-body">                             <textarea id="informationtextcontainer" name="informationtextcontainer">{{content}}</textarea>                             <a onclick="" class="button button-rounded button-reveal button-medium button-green tright"><i class="icon-thumbs-up"></i><span>ok</span></a>                             <a onclick="" class="button button-rounded button-reveal button-medium button-red tright"><i class="icon-thumbs-down"></i><span>cancel</span></a>                         </div>                     </div>                 </div>             </div>         </div>     </script> 

can please tell me how detect when such window gets closed?


Comments