Twitter bootstrap 3 在Bootstrap 2中工作的动态选项卡不';无法在引导3中工作

Twitter bootstrap 3 在Bootstrap 2中工作的动态选项卡不';无法在引导3中工作,twitter-bootstrap-3,Twitter Bootstrap 3,我在Bootstrap 2.1中成功地使用了以下内容,但是当我尝试在Bootstrap 3中使用它时,动态内容没有加载 有人能提出解决办法吗 谢谢 $(函数(){ $(“#MainTabs”).tab(); $(“#MainTabs”).bind(“show”,函数(e){ var contentID=$(e.target).attr(“数据目标”); var contentURL=$(e.target).attr(“href”); if(typeof(contentURL)!=“未定义”)

我在Bootstrap 2.1中成功地使用了以下内容,但是当我尝试在Bootstrap 3中使用它时,动态内容没有加载

有人能提出解决办法吗

谢谢



$(函数(){
$(“#MainTabs”).tab();
$(“#MainTabs”).bind(“show”,函数(e){
var contentID=$(e.target).attr(“数据目标”);
var contentURL=$(e.target).attr(“href”);
if(typeof(contentURL)!=“未定义”)
$(contentID).load(contentURL,function(){$(“#MainTabs”).tab();});
其他的
$(contentID).tab('show');
});
$('MainTabs a:first').tab(“show”);
});

尝试使用

$("#MainTabs").bind("show.bs.tab", function(e) {
而不是

$("#MainTabs").bind("show", function(e) {
尽管从jQuery 1.7开始,
.on()
是附加事件处理程序的首选方法

$("#MainTabs").on("show.bs.tab", function(e) {

就这样-非常感谢您这么快的回复!没问题,如果它确实解决了您的问题,请将答案标记为正确。
$("#MainTabs").bind("show", function(e) {
$("#MainTabs").on("show.bs.tab", function(e) {