Hello,
How can I add on Toggle Button Javascript slideup/slidedown functions on this javascript and change a little bit the mainhead 's bar color to looks collapsed on collapsed category?
How can I add on Toggle Button Javascript slideup/slidedown functions on this javascript and change a little bit the mainhead 's bar color to looks collapsed on collapsed category?
- Code:
$(function(){$(".main .main-head").prepend('<span class="collapse" style="padding: 0px; float:right;width: 28px;height: 17px;overflow: hidden;cursor:pointer;"><img src="http://i73.servimg.com/u/f73/17/06/15/51/cat_mi11.png" alt="Close" /><img class="hide" src="http://i73.servimg.com/u/f73/17/06/15/51/cat_ma11.png" alt="Open" /></span>');$(".collapse").each(function(a){$(this).attr("id","collapse"+location.pathname+a);if(my_getcookie("collapse"+location.pathname+a)=="2"){$(this).children("img[alt='Close']").hide();$(this).children("img[alt='Open']").show();$(this).parent().next().hide()}});$(".collapse img[alt='Close']").click(function(){my_setcookie($(this).parent().attr("id"),1,2,0);$(this).hide().next().show();$(this).parent().parent().next().hide()});$(".collapse img[alt='Open']").click(function(){my_setcookie($(this).parent().attr("id"),0,2,0);$(this).hide().prev().show();$(this).parent().parent().next().show()})});