I have (had) a button on my website that switched between a wide and narrow layout for articles. Since JQuery 1.9, this hasn\'t worked because of the deprecation of toggle.
See my answer here
which would translate to
$(function() {
$('a#switch').on("click",function(e) {
e.preventDefault();
if ($(this).data("show")=="no") {
$('div#right').hide('slide', { direction: 'right' }, 300);
$('div#left').delay(300).animate({width: 950}, 600);
$('span#blogview').toggleClass('hide');
$('span#articleview').toggleClass('hide');
$('span#readability').toggleClass('hide');
$(this).data("show","yes");
}
else {
$('div#right').delay(500).show('slide', { direction: 'right' }, 500);
$('div#left').animate({width: 430}, 500);
$('span#blogview').toggleClass('hide');
$('span#articleview').toggleClass('hide');
$('span#readability').toggleClass('hide');
$(this).data("show","no");
}
});
});