bootstrap jquery show.bs.modal event won't fire

前端 未结 19 2389
小蘑菇
小蘑菇 2020-11-28 07:29

i\'m using the modal example from the bootstrap 3 docs. the modal works. however i need to access the show.bs.modal event when it fires. for now i\'m just trying:



        
19条回答
  •  春和景丽
    2020-11-28 07:58

    i used jQuery's event delegation /bubbling... that worked for me. See below:

    $(document).on('click', '#btnSubmit', function () {
                    alert('hi loo');
                })
    

    very good info too: https://learn.jquery.com/events/event-delegation/

提交回复
热议问题