Code Monkey home page Code Monkey logo

bootstrap-carousel-bkg's Introduction

jQuery Bootstrap Background Carousel

A customisation to Bootstrap Carousel which updates a whole page background image on automatic play using jQuery

Requirements

  • jQuery
  • bootstrap.css
  • bootstrap.js

Installation

  • Clone repo git clone https://github.com/whitewaterdesign/bootstrap-carousel-bkg.git
  • Use the cdn <script src="https://cdn.jsdelivr.net/gh/whitewaterdesign/bootstrap-carousel-bkg/bcb.js"></script>

Usage

Add requirements

<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.4.1.js" integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU=" crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>

Add stylesheet <link rel="stylesheet" href="whitewaterdesign/bootstrap-carousel-bkg/bcb.css">

Add bcb script <script src="whitewaterdesign/bootstrap-carousel-bkg/bcb.js"></script>

Create a bootstrap carousel with id #bcb-carousel and js_image="[url]" parameters on .carousel-item divs for background images

<div id="bcb-carousel" class="carousel slide carousel-fade" data2-ride="carousel">
  <div class="carousel-inner">   	
          <!-- Slide 1 -->
          <div id="page1" class="carousel-item active" js_image="[url]">
            <div class="inner_item min-vh-100">[content]</div>
          </div>
          <!-- /Slide 1 -->
          <!-- Slide 2 -->
          <div id="page2" class="carousel-item" js_image="[url]">
            <div class="inner_item min-vh-100">[content]</div>
          </div>
          <!-- /Slide 2 -->
    </div>
</div>

bootstrap-carousel-bkg's People

Contributors

whitewaterdesign 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.