Bootstrap 3.0.0 modal events not firing

后端 未结 5 1013
无人及你
无人及你 2021-01-03 23:25

I can\'t seem to get modal events working at all using Bootstrap 3. I want to perform an action when my modal closes, but nothing\'s happening.

Here\'s my stripped

5条回答
  •  时光取名叫无心
    2021-01-04 00:11

    The answer marked correct is just that, but an addition to the massive list of 'Dumb things I have done' - also be careful which DOM Element you target. It should be the outer modal Div.

    For example if you are using RequireJS and a template manager like Knockout-amd-helper you might have markup like this

    Parent markup:

    
    

    Template:

    
    

    your script should target '#addThingModal' not '#addThingTemplate'

提交回复
热议问题