Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/naoxink/bgfader
Set your favourite images in the background of your divs (with jQuery)
https://github.com/naoxink/bgfader
background-image fader javascript
Last synced: about 18 hours ago
JSON representation
Set your favourite images in the background of your divs (with jQuery)
- Host: GitHub
- URL: https://github.com/naoxink/bgfader
- Owner: naoxink
- License: mit
- Created: 2015-11-26T16:22:43.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2015-12-03T16:23:45.000Z (about 9 years ago)
- Last Synced: 2024-12-30T03:52:21.676Z (about 2 months ago)
- Topics: background-image, fader, javascript
- Language: JavaScript
- Homepage: http://naoxink.epizy/bgfader
- Size: 8.79 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bgfader
Set your favourite photos in the background of a div# Demo
http://naoxink.hol.es/bgfader# Usage
Set the CSS and the JS
```html```
Choose the div you want
```html
The greatest content in teh world
```
Initialize the bgfader
```javascript
var myBgFader = $('.header').bgfader([
'images/img1.jpg',
'images/img2.jpg',
'images/img3.jpg',
'images/img4.jpg',
], {
'timeout': 3000,
'speed': 3000,
'opacity': 0.4
})myBgFader.start()
```And **enjoy** your backgrounds!
## Available options
Name|type|Optional|Default
---|---|---|---
speed|`integer`|Yes|3000
timeout|`integer`|Yes|3000
opacity|`float`|Yes|0.5## TODO list
- [ ] It explodes with big images (>8Mb~) -> Fade fails first time
- [ ] Images not showing in certain containers