Bootstrap $('#myModal').modal('show') is not working

后端 未结 15 2232
深忆病人
深忆病人 2020-12-03 13:50

I\'m not sure why but all the modal functions are not working with me. I checked the version and the load they are fine.

I keep getting this error message:

15条回答
  •  佛祖请我去吃肉
    2020-12-03 14:12

    This can happen for a few reasons:

    1. You forgot to include Jquery library in the document
    2. You included the Jquery library more than once in the document
    3. You forgot to include bootstrap.js library in the document
    4. The versions of your Javascript and Bootstrap does not match. Refer bootstrap documentation to make sure the versions are matching
    5. The modal
      is missing the modal class
    6. The id of the modal
      is incorrect. (eg: you wrongly prepended # in the id of the
      )
    7. # sign is missing in the Jquery selector

提交回复
热议问题