jQuery Easy Background Resize


By: J.P. Given

You can download this project in either zip or tar formats. You can also view the project page on GitHub here.

How to use:

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

Optional Parameters:

$(document).ready(function() {
	$("body").ezBgResize({
		img : "image/bg.jpg", // Relative path example.  You could also use an absolute url (http://...).
		opacity : 1, // Opacity. 1 = 100%.  This is optional.
		center  : true // Boolean (true or false). This is optional. Default is true.
	});
});

Don't forget to source the plugin in your <head> tag:

<head>
	...
	
	<script src="js/jquery.ez-bg-resize.js" type="text/javascript" charset="utf-8"></script>
	
	...
</head>

Issues?

Please report them to the issues section in GitHub.

Comments

blog comments powered by Disqus