Twitter BootStrap Modal Window fallback link

后端 未结 2 795
日久生厌
日久生厌 2021-02-13 13:43

I am using Twitter Bootstrap modal windows. Just incase the modal windows dont work because of the js error - have a fall back pages. How can i make sure the page is loaded if t

2条回答
  •  清酒与你
    2021-02-13 14:40

    The Modal plugin gives precedence to the data-target attribute. You can then use the href to point to the fallback link that you want. Since the Modal plugin calls preventDefault on click events matching the selector [data-toggle="modal"], the link will only be followed if JavaScript is disabled (or the Modal plugin isn't loaded).

    One thing to keep in mind, however, is that the Modal plugin does use the href attribute for loading remote content. To bypass that feature from being activated, just include a '#' at the end of the href value.

    Login
    

提交回复
热议问题