Search code examples
htmlpython-3.xanchorbootstrap5-modal

How do you call a modal with an anchor tag in bootstrap 5.. I tried using the modal ID in the href as i saw in w3school but nothing happen


here is a pic showing my code some assistance is really needed pic showing my code


Solution

  • your code is correct, have you linked bootstrap Javascript correctly?

    have you tried using data-bs-target="#sample" instead of using href? (not sure but it might be changed since V5 has changed data attribute names to data-bs-something)