The "Image Scale" jQuery plugin was developed to provide an easier way of supporting responsive images on your site.
Installation instructions are provided with the package's README file, and even if you're not that good with JavaScript, you'll still be able to use the plugin.
It only requires you to add two HTML5 data attributes to an image tag, one for controlling the scaling method, and one for the image's alignment in the parent container.
These attributes are optional, meaning there's a default value that gets applied if you forget them.
Of course, just like any jQuery plugin, various parameters are also available, addressing issues like image overflows, fade in animations, if to rescale when the window is resized, and so on.
Features:
- Possible alignment options:
- left
- right
- center
- top
- bottom
- top-left
- top-right
- bottom-left
- bottom-right
- Possible scaling options:
- fill
- best-fill
- best-fit
- best-fit-down
- none
Requirements:
- JavaScript enabled on client side
- jQuery 1.4 or higher
Comments not found