jquery-full-bg

1.0.4 • Public • Published

jquery-full-bg

jQuery plugin para cambiar el fondo de imágenes en tamaño entero y forma aleatoria.

Installation

npm install --save jquery-full-bg
You need to load jQuery first
<script src="/node_modules/jquery/dist/jquery.js"></script>
<script src="/node_modules/jquery-full-bg/src/index.js"></script>

Before using the plugin you need register as developer then you must set the CLIENT_ID to be able to get photos Unsplash API.

window.fullBg.setup(clientId);

How it works?

<div id="custom-id"></div>
$(document).ready(function(){
    window.fullBg.setup(clientId);
    var options = {
    minHeight:'700px', //by default is 800px
    backgroundSize:'contain', // cover
    backgroundPosition:'top center', // center
    backgroundColor:'red', // black
    backgroundImage:'path/img.jpg', //in case that the endpoint responses with an error
    }
    $('#custom-id').FullBg(options);
});

Package Sidebar

Install

npm i jquery-full-bg

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

7.28 kB

Total Files

8

Last publish

Collaborators

  • cesar-valdez