One that's been bugging me for a while. How would I combine these three sets of code together?
$(".fly-out-menu").toggle(
function () {
$('#page').animate({left: 250}, 'fast'); },
function () {
$('#page').animate({left: 0}, 'fast'); }
);
$(".fly-out-menu").toggle(
function () {
$('.sticky-container').animate({left: 250}, 'fast'); },
function () {
$('.sticky-container').animate({left: 0}, 'fast'); }
);
$(".fly-out-menu").toggle(
function () {
$('body').css('position','fixed') },
function () {
$('body').css('position','static') }
);
Thanks, R
togglemethod is deprecated, there is no rule that prevents you from wrting more-than-one-line functions.