I am trying to click a sidebar Menu (div #cssmenu) element and if so it loads content into a div (#tabs). The problem is that the content has a load in it's structure (so it does a load of load) and i think it is the reason i get this warning and error :
Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience.
Undefined is not a function on line pane.tab('show');
This just disable all my dropdown menus in #cssmenu. Thank any help !
$( document ).ready(function() {
$('#tab_quick').load($('#tabs .active a').attr("data-url"),function(result){
$('.active a').tab('show');
});
$('#tabs a').click(function (e) {
e.preventDefault();
var url = $(this).attr("data-url");
var href = this.hash;
var pane = $(this);
// ajax load from data-url
$(href).load(url,function(result){
pane.tab('show');
});
});
});
$( document ).ready(function() {
$('#cssmenu a').click(function (e) {
e.preventDefault();
var url = $(this).data('url');
var pane = $(this);
// ajax load from data-url
$('#tabs').load(url, function(result){ // load the content directly to #tabs
pane.tab('show'); // display the tab
});
});
});