jquery-rnd-fullbg
1.0.1 • Public • Published Jquery-Rnd-FullBg
Jquery plugin for randomly change the background image from Unsplash
Instalation
npm install --save jquery-rnd-fullbg
You need to load Jquery first
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/jquery-rnd-fullbg/src/index.js"></script>
Before using the plugin you need to register as developer in Unsplash, then you must set the CLIENT_ID to be able to get photos from Unsplash API.
window.rndBgUnsplash.setup(clientid);
How it works?
$(document).ready(function(){
window.rndBgUnsplash.setup(clientid);
var options = {
minHeight: 700px,
backgroundSize: contain,
backgroundPosition: 'top center',
backgroundColor: 'red',
backgroundImage: 'path/img.jpg',
}
$(#bg-Rand).RndBgUnsplash(options);
});
Versions
Current Tags
- VersionDownloads (Last 7 Days)
- 1.0.1
1
Version History
Package Sidebar
Install
Weekly Downloads