Coder Social home page Coder Social logo

raj-kishore / bootstrap3-showmanyslideonecarousel Goto Github PK

View Code? Open in Web Editor NEW

This project forked from rtpharry/bootstrap3-showmanyslideonecarousel

0.0 1.0 0.0 172 KB

A sample showing how to configure the Bootstrap 3 carousel to show many panels at once but only slide one at a time

License: MIT License

JavaScript 30.08% HTML 69.92%

bootstrap3-showmanyslideonecarousel's Introduction

Bootstrap3-ShowManySlideOneCarousel

This is a sample showing how to configure the Bootstrap 3 carousel to show many panels at once but only slide one at a time.

Online Demo

I have put these up on two popular interactive playgrounds:

Description

This is a modification to the standard Bootstrap carousel which lets you show four panels at once but only slides them along one panel at a time. Check out one of the demos above to get more of a feel for the effect.

It is responsive and modifies the number of panels shown at a time on smaller screens.

I found the original concept on Bootply but unfortunately tracing it back as far as the thread went back to one that started out with an anon post. This version is now almost a complete rewrite and incorporates many fixes but I do owe credit to the unknown author that made the original breakthrough.

This version has been updated to fix animation bugs and make it compatible with Bootstrap again now that it has moved to using css transitions for its animations.

I've added in a Less stylesheet which means you can easily update the container name and make changes to the numbers of columns (guide in the wiki).

I've also optimised the JavaScript code to remove redundant calls and wrap it up safely.

Quickstart - I don't use NPM, Git, Grunt, Less or any of those technologies

You should take some time to learn them but I'm not going to make you do it right now just so that you can use this in your project!

Your best bet is to load up the sample on CodePen

  1. Copy the html and JavaScript over to your project
  2. In the CSS (Less) panel look in the top right for a small eye symbol. Clicking this will compile the Less into CSS so you can use it without having any special software installed.

Installing - Git

You can install a copy of this by typing this into your command line terminal:

> git clone https://github.com/rtpHarry/Bootstrap3-ShowManySlideOneCarousel.git

Installing - Download

Download the latest release from GitHub

Rebuilding after you have made changes

If you make some tweaks to the JavaScript or Less files you can quickly regenerate them.

Using your command line terminal, navigate to the folder that has the gruntfile.js/package.json in. Enter the following command:

> grunt dev

To generate the unminimised JS and CSS files with a CSS source map for debugging, or

> grunt dist

To create the minified versions.

You will find the project files in the /dist/ folder.

Customisation - Changing the number of slides visible at any one time

This is quite easy but it involves editing both the LESS/CSS and the JS files so I have put this in a wiki item:

Browser Compatibility

I've tested it in:

  • Chrome 41
  • Firefox 36.0.4
  • Internet Explorer 11

Improvements

If you have feedback, please open an issue or initiate a pull request. I'm happy to make improvements where possible.

Website

There is a blog post announcing this but all the information you need is in this repo:

Release History

v1.0 - 27-Mar-2015 - Initial release

License

This software is released under the MIT License.

I just picked it because its an unrestrictive one but as this is based in part on Bootstrap I think I might be tied to it. If this causes issues with your project please open an issue on GitHub and we can look into it.

bootstrap3-showmanyslideonecarousel's People

Contributors

rtpharry avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.