
First let me tell you that it is a Jquery snippet if you do not have Jquery library in your template then follow the step below,else skip this step.
- Add the following line just after <head>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js'/>Now these steps should be followed by everyone.
- Add the following script before ]]></b:skin>
<script>
$(document).ready(function(){
$('.widget').find('h2').click(function(){
$(this).toggleClass('sliding');
if($(this).attr('class')=='sliding'){
$(this).next('.widget-content').slideUp(200);
}
else{
$(this).next('.widget-content').slideDown(200);
}
});
});
</script>
- Save template and see the effect.
- If it do not work then check that your Jquery is inserted or no else our comments are always welcoming you.
Post A Comment:
0 comments: