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: README.md
+31-3Lines changed: 31 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,12 @@
3
3
Flexible Bootstrap Carousel plugin
4
4
5
5
##Introducing
6
-
This plugin makes possible showing different numbers of items in your Bootstrap carousel depending on the browser's window width. In fact it creates several columns in each item of a Bootstrap carousel. Then it is watching if the width of a browser window is changing and is adjusting number of columns in each item respectively to window's size (in this version of the plugin - from 1 through 3 columns).
6
+
This plugin makes possible showing different numbers of entities in each item of your Bootstrap carousel depending on the browser's window width.
7
+
The content of each entity might be either simple (an image, for example)
8
+
or complicated (as a product description with several images, selectors of sizes, colors etc... in internet-store).
9
+
Actually the plugin creates several columns in each item of a Bootstrap carousel.
10
+
Then it is watching if the width of a browser window is changing and is adjusting number of columns in each item respectively to window's size
11
+
(in this version of the plugin - from 1 through 3 columns).
7
12
To see the plugin in action visit this [showcase](http://flexcarousel.surge.sh)
8
13
9
14
##Dependencies
@@ -50,7 +55,8 @@ Instead of linking the flexible-bootstrap-carousel.css file to your web-page you
50
55
51
56
```
52
57
53
-
To initiate the plugin you just need to add a *.flexible* class name to some Bootstrap carousel in your html code
58
+
To initiate the plugin you might add some additional class name to those Bootstrap carousels which you want to turn into flexible ones.
@@ -60,7 +66,8 @@ To initiate the plugin you just need to add a *.flexible* class name to some Boo
60
66
</div>
61
67
```
62
68
63
-
Then you need to create inside of the carousel a container with class name of *.items*. You also should put the items, which you want to appear in the carousel, into this container (each of them should have class of *.item*).
69
+
Then you need to create inside of the carousel a container with class name of *.items*. You also should put the items, which you want to appear in the carousel,
70
+
into this container (each of them should have class of *.item*).
@@ -108,8 +115,29 @@ Then you need to create inside of the carousel a container with class name of *.
108
115
109
116
You can leave empty container with class name of *.carousel-inner*.
110
117
118
+
Finally, you just have to add next code to your JavaScript file:
119
+
120
+
```javascript
121
+
122
+
$(".carousel.flexible").flexCarousel();
123
+
124
+
```
125
+
111
126
You've done it! Enjoy of your page with built in flexible Bootstrap carousel.
112
127
128
+
##Adjusting contents of the entities of the carousel
129
+
130
+
If the content of the entities of your carusel is complicated enough, you might want to adjust it each time when the carousel changes number of elements inside each item.
131
+
To do so you can use the event *aCarouselHasBeenAdjusted*, that is triggered each time when the carousel has been adjusted:
This project is licensed under the MIT License - see the [LICENSE.md](https://github.com/DanDevG/flexible-bootstrap-carousel/blob/master/LICENSE.md) file for details
0 commit comments