You can do it with just plain css
:
div {
position: fixed;
top: 0;
display: none;
}
This will always be on top: 0
regardless of whether it is scrolled or not.
More Related Contents:
- When we using alert vs popup div tag? [closed]
- How to do this mouse over effect in jquery?
- My JS is not working (chat application)
- CSS for background changing over time [duplicate]
- How to apply !important using .css()?
- Make header and footer files to be included in multiple html pages
- Turn a number into star rating display using jQuery and CSS
- Instead of using prefixes I want to ask site visitors to upgrade their browser
- What is the cleanest way to disable CSS transition effects temporarily?
- Parsing CSS in JavaScript / jQuery
- Determine if an element has a CSS class with jQuery
- Show loading image while $.ajax is performed
- How to show popup message like in Stack Overflow
- How to select all checkboxes with jQuery?
- Dropdown select with images
- jquery – How to determine if a div changes its height or any css attribute?
- How to convert unordered list into nicely styled dropdown using jquery?
- Responsive horizontal page sliding
- Scale element proportional to Background Cover with jQuery
- How to build simple tabs with jQuery?
- CSS fade left to right
- Bootstrap Dropdown with Hover
- How to show hidden divs on mouseover?
- Rotate div text after clicking on button using jquery and css
- How do I find which JavaScript is changing an element’s style?
- How to Bootstrap navbar static to fixed on scroll?
- How to use pagination on HTML tables?
- how to use html2canvas and jspdf to export to pdf in a proper and simple way
- How can I reorder elements with JavaScript?
- Can you have multiple lines in an element?