How to slide up-down of all sidebar and apply block-active class in Magento

Put below code into app/design/frontend/[your package]/[your theme]/template/page/html/head.phtml

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
<script type="text/javascript">
    $j = jQuery.noConflict();
</script>
<script type="text/javascript">
    $j(document).ready(function(){
         $j('.block .block-title').children().addClass("block-active");
                $j('.block .block-title').click(function(){
                    $j(this).closest('.block').find('.block-content').not(':animated').slideToggle();
                    $j(this).children().toggleClass("block-active");
                });
    });
</script>
Advertisements
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: