A simple directive for Scott Robinson's Backstretch jQuery plugin.
- Simple
- Responsive
- Mobile
<div backstretch fillheight='300' fillsrc="'image/image.js'" fallback="'image/anotherimage.js'" fade='500'></div>
OR WITH ANGULAR HOOKS
<div backstretch fillheight='300' fillsrc="{{imageLocation}}" fallback="{{alterImageLocation}}" fade='500'></div>
1.0.0
- None
- jQuery (not included)
- backstretch.js (included)
npm install acr-backstretch --save-dev
bower install acr-backstretch --save
Include backstrech after you've included jQuery:
<script src="./js/backstretch.min.js"> <script>
Include the module in your scripts after AngularJS
<script src="./js/acr-backstretch.min.js"> <script>
Add acrBackstretch in your apps dependencies.
var app = angular.module('myApp', ['acrBackstretch']);
fade: [numbers] in miliseconds (i.e. 1000 is 1 second)
fillheight: [number] in pixels (i.e. 400 is 400px)
fallback: [string/url] location of fallback image if desired image (fillsrc) does not exist
MIT - go nuts y'all.