我一直在與這些爲兩天,無法弄清楚如何做到這一點...請諮詢JQuery的舉措不能正常工作下一個元素
http://jsfiddle.net/kbspot/fjVhY/
在底部顯示笨手笨腳的時候,用戶點擊拇指大預覽會顯示...我得到它的工作
問題: 另一件我想補充的是,當用戶點擊大預覽時,將選擇NEXT拇指(底部面板) 。但它沒有按照我的要求工作,Next拇指未被選中。
//Click on thumbnail (this is working perfectly)
$(".panel-bottom li").click(function() {
var $activetab = $('li.active');
//$activetab.('IMG').hide();
$activetab.removeClass('active');
$(this).addClass('active');
//$(this).next().css({'border': '2px solid red'});
});
//Large Preview click (this is the problem)
$("li.active .container").click(function() {
//alert($(this).parent().html());
var $activetab = $(this);
var $nexttab = $activetab.next();
$(this).removeClass();
$nexttab.addClass("active");
});
對不起,林不知道該如何解釋但是我相信你得到它,希望
MildlyInteresting&Phil Cook,謝謝你...檢查你的代碼後,我發現了問題。對不起,小提琴。 [code] // Large Preview click $(「。container」)。click(function(){ var $ activetab = $(this).parent(); \t var $ nexttab = $ activetab.next(); $ activetab.removeClass(「active」); $ nexttab.addClass(「active」); return false; //這會阻止它回到上一個元素 }}; [code] – 2013-02-12 09:48:24