Open remote content in the Bootstrap modal window

前端 未结 2 1102
梦谈多话
梦谈多话 2021-01-31 10:34

All I need is a simple example in how to open a remote content into a Twitter Bootstrap modal window.

I\'m using Bootstrap v2.0.4 and I just can\'t get it to work. I can

2条回答
  •  情书的邮戳
    2021-01-31 10:57

    I dropped a working example here on JSFiddle that illustrates how to use a link to open a bootstrap modal containing a remote URL (of the same origin). It's an almost verbatim copy-paste from twitter's bootstrap docs with some minor modifications to make it work for remote URLS.

    It just comes down to pointing the href attribute to the URL you want to open and the data-target attribute at the DIV that acts as the modal window.

    JSFIddle here

    Same code here:

    
    Launch demo modal
    
    
    

提交回复
热议问题