Skip to content

gdseller/enhance.js

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A port of @fat's simple jQuery plugin for image zooming – now with support for object-fit/object-position, powered by Velocity.js animations, complete with some pre-defined image cropping classes.

Differences

  • Removes Boostrap dependency
  • Adds Velocity.js dependency
  • Supports object-fit and object-position CSS properties
  • Has some classes to get you started with cropped images

To-Dos

  • Add more robust demo
  • Synchronize Velocity.js timing with CSS animation timing
  • Clean up code to allow passing a custom selector/attribute for the targeted images

Known Issues (more todos?)

  • Causes content reflow for images without (expclitly sized) containers, including floated images
  • Doesn’t work on margin: auto centered images
  • Due to animating non-transform properties there is more layout/repainting on images that are cropped

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 49.5%
  • HTML 42.7%
  • CSS 7.8%