0
我希望你能幫助我。我有一個手風琴系統在我正在工作的網站的主頁上工作。這工作與jQuery:鏈接和從另一頁開放的手風琴
$('.accordionButton').click(function() {
//REMOVE THE ON CLASS FROM ALL BUTTONS
$('.accordionButton').removeClass('on');
//NO MATTER WHAT WE CLOSE ALL OPEN SLIDES
$('.accordionContent').slideUp('normal');
//IF THE NEXT SLIDE WASN'T OPEN THEN OPEN IT
if($(this).next().is(':hidden') == true) {
//ADD THE ON CLASS TO THE BUTTON
$(this).addClass('on');
//OPEN THE SLIDE
$(this).next().slideDown('normal');
}
});
//ADDS THE .OVER CLASS FROM THE STYLESHEET ON MOUSEOVER
$('.accordionButton').mouseover(function() {
$(this).addClass('over');
//ON MOUSEOUT REMOVE THE OVER CLASS
}).mouseout(function() {
$(this).removeClass('over');
});
$('.accordionContent').hide();
HTML
<div class="accordionButton">Products</div>
<div class="accordionContent products">
<p>Content here</p>
</div>
</div>
我想另一個網頁上的鏈接,單擊時轉到主頁,並打開這個特定的手風琴。這可能嗎?