Hey Prince,
thx in the first. But I can't put it my use somehow. To be more precise:
I have one page with 3 tabs. The first tab is loaded by default within the page (could be changed if needed). The other two have an URL-Parameter which loads when the tab is selected. Can you follow me and help please?
<script>
var dataLoaded = false, popupObj;
function active() {
if (!dataLoaded) { // To check the ajax data is already loaded or not
$.ajax({
type: "GET",
url: "http://localhost:57773/Content/samplecontent/mvccontent.html",
dataType: "html",
beforeSend: function () {
if (!popupObj) {
$("#MVC").ejWaitingPopup({
showOnInit: true
}); // Creating the WaitingPopup to the tab content div before Ajax Send.
}
else {
popupObj.refresh();
popupObj.show();
}
},
success: function (data) {
setTimeout(function () { // Data is retrieved from the local page not from Online. So that, here setTimeOut used to show the WaitingPopup
$("#MVC").ejWaitingPopup('hide');
$('#MVC').html(data);
dataLoaded = true;
}, 3000);
},
});
}
}
</script> |