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

后端 未结 15 2259
深忆病人
深忆病人 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:23

    Most common reason for such problems are

    1.If you have defined the jquery library more than once.

    
    
    
        
    
    
    

    The bootstrap library gets applied to the first jquery library but when you reload the jquery library, the original bootstrap load is lost(Modal function is in bootstrap).

    2.Please wrap your JavaScript code inside

    $(document).ready(function(){});
    

    3.Please check if the id of the modal is same

    as the one you have defined for the component(Also check for duplication's of same id ).

提交回复
热议问题