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

前端 未结 19 2442
小蘑菇
小蘑菇 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 08:01

    I had a similar but different problem and still unable to work when I use $('#myModal'). I was able to get it working when I use $(window).

    My other problem is that I found that the show event would not fire if I stored my modal div html content in a javascript variable like.

    var content="

    the event never fired because it didn't occur

    my fix was to include the divs in the html body

    
        
    ...

提交回复
热议问题