Bootstrap 4.2.1 - Failed to execute 'querySelector' on 'Document': '[removed]void(0);' is not a valid selector

前端 未结 7 1738
温柔的废话
温柔的废话 2021-02-13 16:54

I am working on a project which I started building on bootstrap 4.0.0. During this project, I had updated bootstrap regulary whenever the new versions ( 4.1.0

7条回答
  •  天命终不由人
    2021-02-13 17:08

    I was having this issue, and a comment on this reported issue clued me into the solution. I was copying the example from the Bootstrap docs, and I had to remove the ID from the parent link, and instead have that ID on the container for the child links, without the aria-labeledby property, and add a reference in the parent link data-target property.

    This example shows what I was doing, which caused the console errors:

    
    

    This is the solution that worked for me:

    
    

提交回复
热议问题