You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
### Changelog
2
2
3
3
**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.
5
5
6
6
**2.5.0**
7
7
Introduced `use` method allowing to use custom visibility classes. Added built-in Foundation 5 support.
Copy file name to clipboardExpand all lines: README.md
+32-31Lines changed: 32 additions & 31 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
3
3
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.
4
4
5
-
Current version: **2.5.0**
5
+
Current version: **2.5.1**
6
6
7
7
### Documentation
8
8
*[Installation](#installation)
@@ -36,31 +36,32 @@ Live example available on [CodePen](http://codepen.io/dih/full/ivECj). Hosted al
36
36
````javascript
37
37
// Wrap IIFE around your code
38
38
(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
+
});
64
65
})(jQuery, ResponsiveBootstrapToolkit);
65
66
````
66
67
@@ -69,7 +70,7 @@ Allows using custom debounce interval. The default one is set at 300ms.
0 commit comments