Menu icon Foundation
Sticky element not sticking to container

Hello,

I am trying to recreate the sticky effect shown in the docs but the element I want to have fixed loads outside of the container and sticks to the window. I have looked at other post but I have yet to find an answer. Here is my code

HTML

<div class="university-map__holder" >
    <div class="holder__one" id="foo" data-sticky-container>
        <div class="holder__two sticky" data-sticky data-anchor="foo">
            <div class="university-map__map " id="university-map-js"></div>
        </div>
    </div>
</div>

stickyhtmlcss

Hello,

I am trying to recreate the sticky effect shown in the docs but the element I want to have fixed loads outside of the container and sticks to the window. I have looked at other post but I have yet to find an answer. Here is my code

HTML

<div class="university-map__holder" >
    <div class="holder__one" id="foo" data-sticky-container>
        <div class="holder__two sticky" data-sticky data-anchor="foo">
            <div class="university-map__map " id="university-map-js"></div>
        </div>
    </div>
</div>
Adam Smith over 1 year ago

If you want to create stick container then you can use any plugin for that. See, I am using same on my website Movies 123.

 

If you want to know how to do it, then let me know.

 

Regards