我有zozo選項卡腳本,我想在更改選項卡上發出ajax請求。 這裏是我的previewZozo選項卡和ajax請求
動畫不工作,這裏 - 我現在不爲什麼,但你可以看到JavaScript代碼:
$(document).ready(function() {
checkOrientation("vertical");
var onSelect = function(event, item) {
console.log("Selected tab text: " + item.tab.text()); alert('dsadsa');
};
var tabbedNav = $("#tabbed-nav").zozoTabs({
orientation: "vertical",
animation: { duration: 200 },
defaultTab: "tab1",
effects: "slideD",
easing: "easeOutQuad",
select: onSelect
});
$("#ddl-orientation").bind("change", function (e) {
var orientation = $(this).val();
checkOrientation(orientation);
tabbedNav.data('zozoTabs').setOptions({ "orientation": orientation });
});
$("#ddl-position").bind("change", function (e) {
tabbedNav.data('zozoTabs').setOptions({ "position": $(this).val() });
});
function checkOrientation(orientation) {
jQuery('#ddl-position').children('option[data-orientation="h"]').attr('disabled', !(orientation === "horizontal"));
}
});
顯然這個動畫很容易在AJAX使用。
我不熟悉JavaScript和我沒有知道我必須做的。
你能告訴我我必須把代碼放到主動ajax的位置嗎?簡單的警報消息就可以了):如果您告訴我如何將ajax請求返回給內容選項卡,我也會很感激。