Skip to content

iamjpg/Ez-Background-Resize

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

The jQuery Easy Background Resize plugin is intended to easily allow a background image to dynamically resize itself to the size of the browser keeping the images aspect ratio in tact.

Installation Instructions

First, make sure you have jQuery loaded within the <head> tag of your page.

<script src="http://www.google.com/jsapi"></script>
<script>google.load("jquery", "1");</script>

Second, put the jQuery EZ Background Resize script in your <head> tag.

<script src="javascripts/jquery.ez-bg-resize.js"></script>

Third, simply call the plugin with an absolute path or relative path to your image:
Note that width and height are required. Won’t work in IE without it.

$("body").ezBgResize({
img : "image/bg.jpg"
});

Optional Settings

Optional arguments are center & opacity.

$("body").ezBgResize({
img : "image/bg.jpg",
opacity : .75,
center : false
});

About

Resizable full-browser background image using jQuery. Implementation requires no CSS.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published