Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tab.js Cannot read property 'getSelectorFromElement' of undefined

I am trying to set up tabs for my Bootstrap project. I have copied and pasted the provided tab example from https://bootstrap.algolia.com/javascript/#tabs into my own project while adding

$('#myTabs a').click(function(e){ e.preventDefault(); $(this).tab('show'); });

Unfortunately, my console is returning the following error:

Cannot read property 'getSelectorFromElement' of undefined

I have also added the id "myTabs" to the main UL element of the tab list. Ideas on why my tabs are not showing the corresponding data on click of each tab?

like image 258
Coded Container Avatar asked Jan 17 '26 03:01

Coded Container


1 Answers

Try to insert the util.js file of bootstrap in your HTML:

<script src="bootstrap/js/dist/util.js"></script>
like image 75
troYman Avatar answered Jan 19 '26 16:01

troYman



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!