Bootstrap 3.x: how to have url change upon clicking modal trigger?

前端 未结 2 461
谎友^
谎友^ 2020-12-06 13:12

Using Bootstrap v3.3.5

I have a webpage that is using the url domain.com/companies

This is my trigger for the modal in that web

2条回答
  •  长情又很酷
    2020-12-06 13:46

    Use this on onclick event of the button that triggers the modal

    onclick="window.location.hash = 'modal-add-company';"
    

    And write following script code after bootstrap.js

    
    

    It should work.

提交回复
热议问题