Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

21 Commits

Folders and files

Repository files navigation

xjdScroll

xjdScroll.js demo

Build Setup

# install dependencies
$ npm install
or
$ yarn install

# install tsc
$ npm install -g typescript

# build for production
$ npm run build
or
$ yarn run build

Using xjdScroll.js programmatically

<!-- index.html -->

<!DOCTYPE html>
<html>

<head>
	<meta charset="utf-8" />
	<link rel="stylesheet" type="text/css" href="css/index.min.css" />
	<title></title>
</head>

<body>
	<div id="myScroll" class="myScroll__bar">
		<div class="myScroll__wrapper">
			<div class="myScroll__content">
				<!-- Content -->
			</div>
		</div>
	</div>
</body>

<script src="js/index.min.js"></script>
<script>
var myScroll = document.getElementById('myScroll');

// xjdScroll(element, options)

var newScroll = new xjdScroll(myScroll);

// or

var newScroll = new xjdScroll(myScroll,{
  height: '600px',
  width: '600px'
})

</script>

Options

Name Description Type Default
width - string "100%"
height - string "100%"

Methods

Name Description Parameters Return
refresh Refresh the scrollbar when the plugin size changes - -

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages