Skip to content

This is a very Simple Javascript Library For Page Top Scroll That Shows How much Scrolling is Left to do

Notifications You must be signed in to change notification settings

abhiib02/PageBar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PageBar.js

pagebar.js is very small snippet of code that gives a simple bar on the top to show how much page scroll left.

standalone code no html no css only add js file

just add this script tag to add pagebar to you webpage

<script src="https://cdn.jsdelivr.net/gh/abhiib02/PageBar/PageBar.js"></script>
</body>
</html>

to customize bar for you own liking in js Without making css class

<script src="https://cdn.jsdelivr.net/gh/abhiib02/PageBar/PageBar.js"></script>
 <script>
    pb_init(
      color = "#00f", 
      shadowColor="#0f0",
      height= "10",     //px values
      shadow = "10",    //px values
      borderRadius="0"  //px values
    );
  </script>
</body>
</html>

to make even more customization create css class like this in head

putting !important is necessary as library make a new another instance of css class and will result not changing according to your customization and dont put width property in it as it is manipulated by library and in result it will do glitches if you put in css class

.bar {
    height: 5px !important;
    background: #ff0;  !important; 
    filter: drop-shadow(0 0 10pxpx #f00)  !important; 
    position: fixed  !important; 
    top: 0  !important; 
    left: 0  !important; 
    border-radius: 10px  !important; 
    z-index: 10000  !important; 
}

Codepen Example and working

https://codepen.io/abhishek-bhardwaj/pen/VwVyrmb?editors=1111

About

This is a very Simple Javascript Library For Page Top Scroll That Shows How much Scrolling is Left to do

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published