Get started with sticky-kit CDN
MIT licensed
Sticky-kit: Lightweight, simple JS plugin for creating sticky webpage elements.
Tags:- sticky
- fixed
- scrolling
- ui
Stable version
Copied!
How to start using sticky-kit CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with sticky-kit CDN - cdnhub.io</title>
<link rel="stylesheet" href="styles.css">
<script src="https://cdn.cdnhub.io/sticky-kit/1.1.3/sticky-kit.min.js"></script>
</head>
<body>
<header id="header">
<h1>Sticky Kit Example</h1>
</header>
<main>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nunc vel bibendum rhoncus, nisl elit bibendum arcu, vel bibendum mi lorem eu nibh. Aliquam erat volutpat. Nam eget dui et urna malesuada bibendum. Donec id elit non mi porta gravida at eget magna.</p>
<p>Nullam id felis et ipsum bibendum ultrices. Maecenas lacinia, arcu eget bibendum rhoncus, elit quam egestas quam, nec luctus tellus nisi vel leo. Sed eget tellus eget nisl tincidunt commodo. Donec eget risus et ante tincidunt laoreet.</p>
</main>
<footer id="footer">
<p>© 2023 Sticky Kit Example. All rights reserved.</p>
</footer>
<script>
window.onload = function() {
const header = document.getElementById('header');
StickyKit.init(header, {
stickyEnabledOnBoxShrink: false,
minWidth: 768,
});
};
</script>
</body>
</html>
Copied!
Copied!