Set footer offset for jquery

Hi,

I’m using a script to display a floating menu. I don’t know how to set an offset for the footer so that it does not go all the way to the bottom. I’d like a 100px margin to the bottom of the screen. Here’s my code:


$(function(){
    function moveFloatMenu() {

        var menuOffset = menuYloc.top + $(this).scrollTop() + "px";

        $('#floatMenu').animate({top:menuOffset},{duration:1200,queue:false});
    }
 
    menuYloc = $('#floatMenu').offset();
 
    $(window).scroll(moveFloatMenu);
 
    moveFloatMenu();
});

Thanks!

I am completely off with this floating menu that how it works but did you try something like this?


$('#floatMenu').animate({top:menuOffset,bottom:'100px'},{duration:1200,queue:false});

Just a wild try only :stuck_out_tongue:

Yup, tried that. Didn’t work.

Found the solution with another jquery plugin, thanks all.

http://plugins.jquery.com/project/stickyfloat