# Stick On Scroll

To use the toast popup functionality the fusionCSS.js library needs to be included.

This is a sticky bar

This is just filler content to space the two sticky bars.

This is a 2nd sticky bar

    <div class="card stickyBar">
    	<div class="content text-center">
    		This is a sticky bar
    	</div>
    </div>

    <section class="card" style="margin-top: 1rem;">
    	<div class="content">
    		<p>This is just filler content to space the two sticky bars.</p>
    	</div>
    </section>

    <div class="card stickyBar2">
    	<div class="content text-center">
    		This is a 2nd sticky bar
    	</div>
    </div>
    <script type="text/javascript" src="../js/fusionCSSTrackElem.js"></script>

    	$(document).ready(function() {
    	$('.stickyBar').stickyOnScroll({
    		stoppedBy: $('.appbar')
    	});

    	$('.stickyBar2').stickyOnScroll({
    		stoppedBy: $('.stickyBar')
    	});
    });

Parameters

stuckClass
  The CSS class to add when an element is in th stuck state, defaults to stuck.
handler
  The function to call when crossing the boundary, the 1st parameter is the direction of crossing up or down.
offset
  Offset to apply to the stickiness in pixels.
stoppedBy
  The element which this element will stop under.