Skip to content

Commit 4841dc6

Browse files
author
Maciej Gurban
committed
Version bump and README formatting
1 parent 6767cde commit 4841dc6

File tree

4 files changed

+37
-36
lines changed

4 files changed

+37
-36
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
### Changelog
22

33
**2.5.1**
4-
Delaying the injection of visibility divs container into `body` until `$(document).ready()`, and thus allowing the inclusion of library inside `<head>` section.
4+
Delaying the injection of visibility div container into `body` until `$(document).ready()`, and thus allowing the inclusion of library inside `<head>` section.
55

66
**2.5.0**
77
Introduced `use` method allowing to use custom visibility classes. Added built-in Foundation 5 support.

README.md

Lines changed: 32 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Responsive Bootstrap Toolkit provides an easy way of breakpoint detection in JavaScript, detecting changes in currently active breakpoint, as well as executing any breakpoint-specific JavaScript code. Despite the name, you can use it also with Foundation, or any other framework.
44

5-
Current version: **2.5.0**
5+
Current version: **2.5.1**
66

77
### Documentation
88
* [Installation](#installation)
@@ -36,31 +36,32 @@ Live example available on [CodePen](http://codepen.io/dih/full/ivECj). Hosted al
3636
````javascript
3737
// Wrap IIFE around your code
3838
(function($, viewport){
39-
40-
// Executes only in XS breakpoint
41-
if( viewport.is('xs') ) {
42-
// ...
43-
}
44-
45-
// Executes in SM, MD and LG breakpoints
46-
if( viewport.is('>=sm') ) {
47-
// ...
48-
}
49-
50-
// Executes in XS and SM breakpoints
51-
if( viewport.is('<md') ) {
52-
// ...
53-
}
54-
55-
// Execute code each time window size changes
56-
$(window).resize(
57-
viewport.changed(function(){
58-
if( viewport.is('xs') ) {
59-
// ...
60-
}
61-
})
62-
);
63-
39+
$(document).ready(function() {
40+
41+
// Executes only in XS breakpoint
42+
if(viewport.is('xs')) {
43+
// ...
44+
}
45+
46+
// Executes in SM, MD and LG breakpoints
47+
if(viewport.is('>=sm')) {
48+
// ...
49+
}
50+
51+
// Executes in XS and SM breakpoints
52+
if(viewport.is('<md')) {
53+
// ...
54+
}
55+
56+
// Execute code each time window size changes
57+
$(window).resize(
58+
viewport.changed(function() {
59+
if(viewport.is('xs')) {
60+
// ...
61+
}
62+
})
63+
);
64+
});
6465
})(jQuery, ResponsiveBootstrapToolkit);
6566
````
6667

@@ -69,7 +70,7 @@ Allows using custom debounce interval. The default one is set at 300ms.
6970

7071
````javascript
7172
$(window).resize(
72-
viewport.changed(function(){
73+
viewport.changed(function() {
7374

7475
// ...
7576

@@ -80,8 +81,8 @@ $(window).resize(
8081
#### Get alias of current breakpoint
8182
````javascript
8283
$(window).resize(
83-
viewport.changed(function(){
84-
console.log( 'Current breakpoint: '+ viewport.current() );
84+
viewport.changed(function() {
85+
console.log('Current breakpoint: ', viewport.current());
8586
})
8687
);
8788
````
@@ -95,7 +96,7 @@ Instead of Bootstrap's aliases `xs`, `sm`, `md` and `lg`, Foundation uses: `smal
9596

9697
viewport.use('Foundation');
9798

98-
if( viewport.is('small') ) {
99+
if(viewport.is('small')) {
99100
// ...
100101
}
101102

@@ -118,7 +119,7 @@ Currently, only Foundation 5 visibility classes are supported. If you'd like to
118119

119120
viewport.use('Custom', visibilityDivs);
120121

121-
if( viewport.is('alias-1') ) {
122+
if(viewport.is('alias-1')) {
122123
// ...
123124
}
124125

dist/bootstrap-toolkit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
* Responsive Bootstrap Toolkit
33
* Author: Maciej Gurban
44
* License: MIT
5-
* Version: 2.5.0 (2015-05-14)
5+
* Version: 2.5.1 (2015-11-02)
66
* Origin: https://github.com/maciej-gurban/responsive-bootstrap-toolkit
77
*/
8-
var ResponsiveBootstrapToolkit = (function($){
8+
;var ResponsiveBootstrapToolkit = (function($){
99

1010
// Internal methods
1111
var internal = {

dist/bootstrap-toolkit.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)