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

后端 未结 15 2243
深忆病人
深忆病人 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-03 14:35

    My root cause was that I forgot to add the # before the id name. Lame but true.

    From

    $('scheduleModal').modal('show');
    

    To

    $('#scheduleModal').modal('show');
    

    For your reference, the code sequence that works for me is

    
    
    
    
    
    
    
    

提交回复
热议问题