Get started with jquery.sticky CDN
MIT, GPL licensed
Lightweight plugin: jQuery Sticky for fixed headers during scrolling.
Tags:- UI
- DOM
- sticky
- jquery-plugin
Stable version
Copied!
How to start using jquery.sticky CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with jquery.sticky CDN - cdnhub.io</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/css/jquery.min.css">
<link rel="stylesheet" href="styles.css">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="https://cdn.cdnhub.io/jquery.sticky/1.0.4/jquery.sticky.min.js"></script>
</head>
<body>
<header id="header">
<h1>Sticky Header Example</h1>
</header>
<main>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed euismod, nisi quis scelerisque blandit, tortor quam feugiat mi, at fermentum velit mauris in quam.</p>
<p>Phasellus lacinia, magna eget consectetur rhoncus, mi lacus venenatis nisl, vel aliquet velit nisi quis nisl. Nullam id felis et ipsum bibendum ultrices.</p>
</main>
<footer id="footer">
<p>© 2023 Your Company. All rights reserved.</p>
</footer>
<script>
$(function() {
$('#header').sticky({top: 0});
});
</script>
</body>
</html>
Copied!
Copied!
Copied!