Skip to content

This plugin allows you to fill the background of a page with an image–all while maintaining the aspect ratio and gracefully handling window resizing.

License

Notifications You must be signed in to change notification settings

kamiller/jQuery-Backgrounder

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jQuery Backgrounder Plugin

This is the jQuery Backgrounder plugin. This plugin allows you to fill the background of a page with an image–all while maintaining the aspect ratio and gracefully handling window resizing.

How to use it

  • Include jQuery and the plugin file in your page
  • Add a div to your page which includes an image. The div can be set to display:none; if you'd like. I prefer fairly large images but any size will do.
  • Call the backgrounder() function on your div—preferably when the page loads.
  • Include the "element" option to apply it to a specific element (default is the body)
  • No CSS file is required
  • Use the demo.html page for guidance.

License

This little plugin is licensed under the MIT license. See the MIT-LICENSE.txt file for details. The image used in this example (birthday.jpg) is copyrighted (by me) and may not be used by you. Why would you want a picture of my kid, anyway?

About

This plugin allows you to fill the background of a page with an image–all while maintaining the aspect ratio and gracefully handling window resizing.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages