Skip to content

jlcfly/DoubleScroll

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

DoubleScroll

Plain ol' Javascript that places a horizontal scroll bar at the top of a horizontally-scrollable element.

Add DoubleScroll.js via a script tag. Then, in your HTML, wrap the element you want to horizontally scroll with a div tag:

<div id="doublescroll">
.
.
.
</div>

Then in your javascript:

DoubleScroll(document.getElementById('doublescroll'));

You do not have to id your outer div 'doublescroll'. Name it whatever you want. Just reference it appropriately in the javascript call.

It's not required to style the #doublescroll element, but it might be advisable to do so in certain circumstances. For example, adding a border:

#doublescroll {
	border: 1px solid #999;
}

That's it.

About

Adds horizontal scroll bar to top of horizontally-scrollable element

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published