0
我正在使用一個JQuery選項卡式菜單,它包含不同類型的表單,當我選擇位於不同類型的選項卡下的不同表單並提交表單時,選項卡將跳轉到默認選項卡,而不是表單所在的當前選項卡JQuery選項卡導航菜單和PHP表單問題?
我在想如何解決這個問題,這樣當表單被提交時,當前標籤仍然被選中,是JQuery還是PHP問題?
這裏是JQuery。
$(document).ready(function() {
//When page loads...
$(".form-content").hide(); //Hide all content
var firstMenu = $("#home-menu ul li:first");
firstMenu.show();
firstMenu.find("a").addClass("selected-link"); //Activate first tab
$(".form-content:first").show(); //Show first tab content
//On Click Event
$("#home-menu ul li").click(function() {
$("#home-menu ul li a").removeClass("selected-link"); //Remove any "selected-link" class
$(this).find("a").addClass("selected-link"); //Add "selected-link" class to selected tab
$(".form-content").hide(); //Hide all tab content
var activeTab = $(this).find("a").attr("href"); //Find the href attribute value to identify the selected-link tab + content
$(activeTab).fadeIn(); //Fade in the selected-link ID content
return false;
});
});
是否有可能與jQuery? – SlAcKeR 2010-03-19 00:10:51
當然有可能讓我有時間向你發佈一些其他的代碼! – 2010-03-19 00:13:14