Hi all,
I am hoping you can help me. I have an accordian system working on the home page of a site I am working on. This works with jQuery:
I want to link to one of the sections from another page. So you click a link and you get sent to the home page with the products content showing. I have given the products accordian box another class:Code://ACCORDION BUTTON ACTION (ON CLICK DO THE FOLLOWING) $('.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();
<div class="accordionContent products">
<p>Content to show here</p>
</div>
Is this possible?


Reply With Quote

Bookmarks