Skip to content
/ fit Public

a jQuery plugin for centering and cropping images

Notifications You must be signed in to change notification settings

jgallen23/fit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#jQuery Fit

jQuery Fit is a plugin that will center and crop your images to fit perfectly in their container.

##Download

##Usage

$('.resize img').fit();

##Options

$('.resize img').fit({
	resizeParent: true, //will resize the container to fit the resized image's aspect ratio [default: false]
	resize: true //will make sure that the entire photo is visible.  Resizes to fit the container and maintains aspect ratio [default: true]
});

##Events

$('img')
	.fit()
	.on('fit', function() {
		//fires after EACH image has been processed 
	})
	.on('end', function() {
		//fires after ALL images have been processed
	});

About

a jQuery plugin for centering and cropping images

Resources

Stars

Watchers

Forks

Packages

No packages published