Skip to content

Instantly share code, notes, and snippets.

@SpencerCooley
Created May 10, 2012 19:43
Show Gist options
  • Select an option

  • Save SpencerCooley/2655387 to your computer and use it in GitHub Desktop.

Select an option

Save SpencerCooley/2655387 to your computer and use it in GitHub Desktop.
$(document).ready(function(){
$('.show_icon').click(function()
{
$(this).parent().parent().find('div[class^="right_side_content"]').slideDown('slow');
$(this).css('display','none');
$('.hide_icon').css('display','block');
$.cookie('content', 'extended');
});
$('.hide_icon').click(function()
{
$(this).parent().parent().find('div[class^="right_side_content"]').slideUp('slow');
$(this).css('display','none');
$('.show_icon').css('display','block');
$.cookie('content', 'collapsed');
});
var content = $.cookie('content');
if (content == 'collapsed') {
$('.right_side_content').hide();
};
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment