Advertisement
kpietrek

sidebar

Jan 28th, 2017
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // JavaScript Document
  2. jQuery.noConflict();
  3. jQuery(function() {
  4.     jQuery(".clickedbuttons").hide();
  5.     jQuery(".buttons").click(function() {
  6.         jQuery(".sidebar").animate({height: "hide", opacity: 0}, 500,
  7.             function() {
  8.                 jQuery(".forums").animate({width: "100%"}, 500);
  9.             });
  10.         jQuery(this).hide();
  11.         jQuery(".clickedbuttons").show();
  12.         jQuery.cookie("sidebar","collapsed", {expires: 365});
  13.         return false;
  14.     });
  15.     jQuery(".clickedbuttons").click(function() {
  16.         jQuery(".forums").animate({width: "80%"}, 500,
  17.             function() {
  18.                 jQuery(".sidebar").animate({height: "show", opacity: 1}, 500);
  19.             });
  20.         jQuery(this).hide();
  21.         jQuery(".buttons").show();
  22.         jQuery.cookie("sidebar","expanded", {expires: 365});
  23.         return false;
  24.     });
  25.     if(jQuery.cookie("sidebar") == "collapsed") {
  26.         jQuery(".buttons").hide();
  27.         jQuery(".clickedbuttons").show();
  28.         jQuery(".forums").css("width","100%");
  29.         jQuery(".sidebar").hide();
  30.     };
  31. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement