##Introduce ์น๋ธ๋ผ์ฐ์ ์์ ์ฌ์ฉ๋๋ ๊ธฐ๋ณธ ์คํฌ๋กค๋ฐ์ ๋๋ค.
##How to Use ####HTML ์๋์ ๊ฐ์ด ๊ฐ์ธ๋ ํ๊ทธ์ ๋ณด์ผ ์์ญ์ ํ๊ทธ, ๊ทธ๋ฆฌ๊ณ ๋ด์ฉ ํ๊ทธ๋ก ์์ฑํฉ๋๋ค.
<div class="wrap">
<div class="box">
<div class="content">
...
</div>
</div>
</div>
####CSS ์ ์ฒด ๊ฐ์ธ๋ ํ๊ทธ์ ๋ด์ฉ ๊ฐ์ธ๋ ํ๊ทธ๋ ๋ฐ๋์ ๊ฐ๋ก, ์ธ๋ก ๊ธธ์ด๋ฅผ ๋ช ์ํ์ฌ์ผ ํฉ๋๋ค. ๋ค๋ง ์ธ๋ก ๊ธธ์ด๋ฅผ ํผ์ผํธ๋ก ๋ช ์ํ ๊ฒฝ์ฐ ํ๋ฉด์์ ๋ณด์ด์ง ์์ ์ ์์ต๋๋ค. ํ๊ฐ์ง ์ฃผ์ํ ์ ์, Javascript๋ก ์์ฑ๋ ํด๋์ค(๊ธฐ๋ณธ: customClass)๋ฅผ ์ค์ฌ์ผ๋ก ์์ฑํ์ฌ ํฉ๋๋ค.
.customClass {
width: 100%;
height: 250px;
}
.customClass-viewport {
width: 100%;
height: 248px;
border: 1px solid #e5e5e5;
}
.customClass-scrollbar {
top: 0px;
right: 0px;
width: 15px;
}
.customClass-track {
width: 15px;
height: 15px;
background: #e5e5e5;
}
.customClass-thumb {
width: 15px;
height: 15px;
background: #ccc;
}
.customClass-first-thumb {
width: 15px;
height: 15px;
background: #b3b3b3;
}
.customClass-end-thumb {
width: 15px;
height: 15px;
background: #b3b3b3;
}
####JAVASCRIPT jquery ํ๋ฌ๊ทธ์ธ์ ์์ฑํ ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ์์ฑํฉ๋๋ค.
$( '.customClass' ).scrollbar( );
javascript์ผ๋ก ์์ฑํ ๊ฒฝ์ฐ ์๋์ ๊ฐ์ด ์์ฑํฉ๋๋ค.
new Scrollbar( {
wrapping: document.getElementsByClassName( 'customClass' )[ 0 ],
viewport: document.getElementsByClassName( 'customClass-viewport' )[ 0 ],
contents: document.getElementsByClassName( 'customClass-contents' )[ 0 ]
} );
##method
- update: ๋ด์ฉ ์ ๋ฐ์ดํธ
####jquery option
- $wrapping: {jQuery Selector} (default: $( this )) ์ ์ฒด ๊ฐ์
- $viewport: {jQuery Selector} (default: $( this ).find( '>[class$="viewport"]' )) ๋ณด์ด๋ ์์ญ
- $contents: {jQuery Selector} (default: $( this ).find( '>[class$="contents"]' )) ๋ด์ฉ ์์ญ
####javascript option
- wrapping: required {elements} (default: null) ์ ์ฒด ๊ฐ์
- viewport: required {elements} (default: null) ๋ณด์ด๋ ์์ญ
- contents: required {elements} (default: null) ๋ด์ฉ ์์ญ
####common option
- axis: {String} (Default: 'y') ์คํฌ๋กค๋ฐ๊ฐ ์์ฑ๋ ์ถ
- wheel: {Integer} (Default: 40) ๋ง์ฐ์ค ํ ๋ก ์คํฌ๋กคํ ์ ์คํฌ๋กค๋ฐ ์์ง์ผ ์ ๋
- customClass: {String} (Default: 'customClass') ์ฌ์ฉ์ ํด๋์ค
- appendButton: {Boolean} (Default: true) ์/ํ ์คํฌ๋กค๋ฐ ๋ฒํผ ์ฌ์ฉ ์ฌ๋ถ, ํน์ ์ข/์ฐ
- create: {Function} (default: null) ์์ฑ์ ์ฝ๋ฐฑ ํจ์
- update: {Function} (default: null) ์ ๋ฐ์ดํธ ํ ์ฝ๋ฐฑ ํจ์
- active: {Function} (default: null) ์คํฌ๋กค ํ ์ฝ๋ฐฑ ํจ์
- license: http://blim.mit-license.org/
- site: http://www.blim.co.kr/
- email: [email protected]