How to get twitter bootstrap modal to close (after initial launch)

前端 未结 10 942
半阙折子戏
半阙折子戏 2020-12-24 04:13

I\'m very much a noob, so I think I\'m overseeing something (probably obvious) with twitter bootstrap modal. What I am trying to do is get a modal to launch only on mobile.

10条回答
  •  一个人的身影
    2020-12-24 04:55

    Try specifying exactly the modal that the button should close with data-target. So your button should look like the following -

    
    

    Also, you should only need bootstrap.modal.js so you can safely remove the others.

    Edit: if this doesn't work then remove the visible-phone class and test it on your PC browser instead of the phone. This will show whether you are getting javascript errors or if its a compatibility issue for example.

    Edit: Demo code

    
    
        Test
        
        
        
    
        
    
    
        
    
    
    

提交回复
热议问题