mirror of
https://github.com/a2nt/webpack-bootstrap-ui-kit.git
synced 2024-09-30 13:19:04 +02:00
23 lines
350 B
JavaScript
23 lines
350 B
JavaScript
|
"use strict";
|
||
|
|
||
|
import $ from 'jquery';
|
||
|
|
||
|
const ShrinkUI = (($) => {
|
||
|
// Constants
|
||
|
const G = window;
|
||
|
const D = document;
|
||
|
|
||
|
// shrink bar
|
||
|
$(G).scroll(() => {
|
||
|
if ($(D).scrollTop() > 100) {
|
||
|
$('body').addClass('shrink');
|
||
|
} else {
|
||
|
$('body').removeClass('shrink');
|
||
|
}
|
||
|
});
|
||
|
|
||
|
return ShrinkUI;
|
||
|
})($);
|
||
|
|
||
|
export default ShrinkUI;
|