Skip to content

Commit dd7baed

Browse files
committed
Update docs
1 parent 305f375 commit dd7baed

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212

1313
Several quick start options are available:
1414

15-
* [Download the latest release](https://github.com/vsn4ik/bootstrap-checkbox/archive/v1.4.0.zip "Download Bootstrap-checkbox").
16-
* Clone the repo: `git clone https://github.com/vsn4ik/bootstrap-checkbox.git`.
17-
* Install with [npm](https://www.npmjs.com): `npm install bootstrap-checkbox`.
18-
* Install with [yarn](https://yarnpkg.com): `yarn add bootstrap-checkbox`.
19-
* Install with [Composer](https://getcomposer.org): `composer require vsn4ik/bootstrap-checkbox "dev-master"` (deprecated on v.1.4.1).
15+
* [Download the latest release](https://github.com/vsn4ik/bootstrap-checkbox/archive/v1.4.0.zip "Download Bootstrap-checkbox")
16+
* Clone the repo: `git clone https://github.com/vsn4ik/bootstrap-checkbox.git`
17+
* Install with [npm](https://www.npmjs.com): `npm install bootstrap-checkbox`
18+
* Install with [yarn](https://yarnpkg.com): `yarn add bootstrap-checkbox`
19+
* Install with [Composer](https://getcomposer.org): `composer require vsn4ik/bootstrap-checkbox "dev-master"` (deprecated on v.1.4.1)
2020

2121
### What's included
2222

docs/assets/js/docs.js

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ document.addEventListener('DOMContentLoaded', function() {
1515
'<div class="input-group-addon">' +
1616
'<span>' + data.stargazers_count + '</span>' +
1717
'&nbsp;' +
18-
'<span class="fa fa-star"></span>' +
18+
'<span class="fas fa-star"></span>' +
1919
'</div>' +
2020
'</div>';
2121

@@ -32,29 +32,32 @@ document.addEventListener('DOMContentLoaded', function() {
3232
document.documentElement
3333
];
3434

35-
var $scrollBtn = $('#scroll-top');
35+
var scrollButtonNode = document.querySelector('#scroll-top');
3636

37-
function updateScrollBtnCls() {
37+
function updateScrollButtonVisibility() {
3838
var scrollTop = containers.reduce(function(result, element) {
3939
return result + element.scrollTop;
4040
}, 0);
4141

42-
$scrollBtn.toggleClass('hidden', scrollTop < 100);
42+
scrollButtonNode.classList.toggle('hidden', scrollTop < 100);
4343
}
4444

45-
$scrollBtn.on('click', function() {
45+
scrollButtonNode.addEventListener('click', function() {
4646
window.onscroll = null;
4747

48-
$(this).addClass('hidden');
48+
scrollButtonNode.classList.add('hidden');
4949

50+
// 'html' for Mozilla Firefox, 'body' for other browsers
5051
$(containers).animate({
5152
scrollTop: 0
5253
}, 500, $.proxy(function() {
53-
window.onscroll = updateScrollBtnCls;
54+
window.onscroll = updateScrollButtonVisibility;
5455
}, this));
5556
});
5657

57-
window.onscroll = updateScrollBtnCls;
58+
window.onscroll = updateScrollButtonVisibility;
59+
60+
updateScrollButtonVisibility();
5861

5962
$('#input-1').data({
6063
html: true,
@@ -65,6 +68,4 @@ document.addEventListener('DOMContentLoaded', function() {
6568
$(':checkbox').checkboxpicker({
6669
groupCls: 'm-b'
6770
});
68-
69-
updateScrollBtnCls();
7071
});

0 commit comments

Comments
 (0)