bootstrap anchor text modal

  • fahim45
    Likes 1

    Problem Description

    without button, only useing anchor text how can i make a modal? my code like is this:

    <a href="#">
          <div class="col-xs-12 footer-pp">
                <div class="footer-privacy">
                         Privacy Policy
                 </div>
          </div>
    </a>

    when i click Privacy Policy link, a modal will be opened. How can i do that in bootstrap v4?

  • Sonar Systems admin
    Likes 1

    You need to add the data-toggle and data-target to the element you want to trigger the modal like so

    <a href="#">
                  <div class="col-xs-12 footer-pp">
                        <div class="footer-privacy" data-toggle="modal" data-target="#ModelName" >
                                 Privacy Policy
                         </div>
                  </div>
            </a>

     

  • bozhidar.genev
    Likes 1

    why do u wanna use boostrap v4? it’s still in alpha .. what are the best new features about v4? 


    This reply has been verified.

Login to reply