简体   繁体   中英

Dynamic tabs using Bootstrap not working! Doesn´t open on click

my problem is simple. I created some dynamic tabs with content but they doesn't open... I have tried everything. I think something is wrong with the jquery:

$(".nav-tabs").on("click", "a", function(e){
  e.preventDefault();
  $(this).tab('show');
})

But I'm not sure. I will appreciate any kind of help, thank you very much!!

This is the fiddle: https://jsfiddle.net/j6kLbgz1/

If you need something else tell me!

If you're talking about tab in jsfiddle, the only problem is because you did't include bootstrap library. Place the below link at External Resources section..

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js
https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css

See Update Fiddle

https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js

JS reference is missing. Hence the jquery isn't responding.

Click on External Resources on the left hand menu and add thee above reference.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM