How to use

Copy-paste the stylesheet <link> into your <head> to load the CSS.

              
                <link rel="stylesheet" href="../assets/vendor/hs-sticky-header/src/hs.sticky-header.css">
              
            

Copy-paste the init function under JS Plugins Init., before the closing </body> tag, to enable it.

              
                <!-- JS Implementing Plugins -->
                <script src="../assets/vendor/hs-sticky-header/src/hs.sticky-header.js"></script>

                <script>
                  $(document).on('ready', function () {
                    // initialization of sticky header
                    $('.js-sticky-header').HSStickyHeader();
                  });
                </script>
              
            

Example

Methods

Parameters Description Default value

offsetTop

Add custom offset from top in px 0