jquery - Bootstrap 3 Carousel: Displaying set of Images as per button choice -


this trying achieve: have 3 category of images different no. of images in each category: category 1 (5 images), category 2 (3 images) , category 3 (4 images).

the images displayed in carousel should follow order: if button 1 pressed gets active , displays images of category 1, if button 2 slider displays 3 images of category 2 , 4 images of category 3 on pressing button 3. possible through bootstrap carousel not want slider purpose.

so, here implementation solve problem:

http://jsbin.com/qemiki/7/edit

how works?

  • the plugin exposes 2 classes: slidebycategory , dynamiccarousel
  • dynamiccarousel, in short terms, creates slideshow this:
{   'id': '#category_b',   'slides': [{     img: 'http://themes.themolitor.com/wpbm/files/2011/05/tumblr_mrraevblsp1st5lhmo1_12801-280x170.jpg',     title: 'foo category b',     desc: 'my lorem foo'   }, {     img: 'http://themes.themolitor.com/wpbm/files/2011/05/16gz2hu-280x170.jpg'   }, {     img: 'http://themes.themolitor.com/wpbm/files/2011/05/1erbrva-280x170.jpg',     title: 'bar category b',     desc: 'my lorem bar desc'   }] } 

the slidebycategory, depends on previous one, accepts array of categories, similar structure.


Comments

Popular posts from this blog

javascript - gulp-nodemon - nodejs restart after file change - Error: listen EADDRINUSE events.js:85 -

Fatal Python error: Py_Initialize: unable to load the file system codec. ImportError: No module named 'encodings' -

javascript - oscilloscope of speaker input stops rendering after a few seconds -