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
Like that?
As pointed out by @undefined, this event is now deprecated.
One way of handling this yourself would be: