jquery - Set Content's Width to 100% when Sidebar is Hidden? -


beforehand, pardon me poor english.

ok here's live site have: http://bleachindonesia.com/forum/

if notice little x on left, toggle show/hide sidebar. jquery working fine. problem content's width won't wider (to 100%) / won't fill empty space when hide sidebar (the sidebar left empty space when hidden).

i need content's width 100% when sidebar hidden, retaining smooth animation. perhaps 1 in vbulletin forum.

here jquery btw:

//<!-- if($.cookie("sidebarpost") == undefined) {     $.cookie("sidebarpost", "expanded"); } var state = $.cookie("sidebarpost"); if(state == "collapsed") {     $('.lside').hide();             $('.lclose').hide();             $('.lopen').show(); }  if($.cookie("sidebarpost") == "expanded") {     $("#left-side").toggle(function(){       $.cookie("sidebarpost", "collapsed");       $('.lopen,.lclose').toggle();       $('.lside').fadeout().delay(1000);       $('#content').hide("slide", { direction: "left" }, 2000);     },function(){       $.cookie("sidebarpost", "expanded");       $('.lopen,.lclose').toggle();       $('#content').show("slide", { direction: "right" }, 2000).delay(1000);       $('.lside').fadein();     }); } else {     $("#left-side").toggle(function(){       $.cookie("sidebarpost", "expanded");       $('.lopen,.lclose').toggle();       $('#content').show("slide", { direction: "right" }, 2000).delay(1000);       $('.lside').fadein();     },function(){       $.cookie("sidebarpost", "collapsed");       $('.lopen,.lclose').toggle();       $('.lside').fadeout().delay(1000);       $('#content').hide("slide", { direction: "left" }, 2000);     }); } //--> 

i know it's kind of bloated, perhaps if there way minimize it, helpful. can help?

you adjust content width part of toggle functions. like:

$('.lside').fadeout(400, function(){$('#content').width("98%")});  $('.lside').fadein(400, function(){$('#content').width("76%")}); 

Comments

Popular posts from this blog

c++ - Is it possible to compile a VST on linux? -

java - Output of Eclipse is rubbish -

jquery - Confused with JSON data and normal data in Django ajax request -