No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit 760e973 Feb 14, 2018
Permalink
Failed to load latest commit information.
build merge Feb 13, 2018
demo export, demo meta, main js file Sep 22, 2017
src merge Feb 13, 2018
.gitignore init Aug 21, 2017
README.md fix demo, readme Sep 5, 2017
gulpfile.js fix demo, readme Sep 5, 2017
package.json 1.0.2 Feb 13, 2018

README.md

videoBackground

Demo

https://lemehovskiy.github.io/videoBackground/demo

Package Managers

# NPM
npm install video_background

Data Attribute Settings

In parallaxContent you can now add settings using the data-video-background attribute. You still need to call $(element).videoBackground() to initialize videoBackground on the element.

Example:

<div class="html-video-background" data-video-background='{"ratio_x": 16, "ratio_y": 9}'>
    <video src="video.mp4" autoplay muted></video>
</div>

<script>
    $('.html-video-background').videoBackground();
</script>

Settings

Option Type Default
ratio_x int 16
ratio_y int 9

Example:

<div class="html-video-background">
    <video src="video.mp4" autoplay muted></video>
</div>

<script>
    $('.html-video-background').videoBackground({
        ratio_x: 16,
        ratio_y: 9,
    });
</script>

Browser support

  • Chrome
  • Firefox
  • Opera
  • IE10/11

Dependencies

  • jQuery 1.7