HTML fixed element with scrollToFixed

Asked

Viewed 125 times

0

I’m using the scrollToFixed plugin to work with fixed elements on the screen. What I’m trying to do is, I have a div, and when my header hits a certain point, I want that div to move along and when I get near my footer, it stops. The point is that I’m not able to do this with this plugin. What I’m doing:

 $(document).ready(function () {
            $('#divBusca').scrollToFixed({
                marginTop: 20,
                limit: 1725
            });
        });

Example of what I need to do: Example here

  • I find duplicated http://answall.com/a/4126/129 and/or http://answall.com/a/27180/129. There are probably others.

  • 1

    A blz, I’ll withdraw the question then. Thanks.

  • If the answers that already exist do not solve the problem then poses a question with the specific problem that you cannot solve.

  • Raphael, I improved on the example in the other answer: http://answall.com/a/27180/129

  • It almost worked, he’s just not respecting my footer, he overtakes.

  • When you give your page as an example link of the problem the question becomes meaningless after the problem is solved, or like now that nothing works. Create a jsFiddle, or adapt mine to be a fixed example of the problem and we can help.

Show 1 more comment
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.