johnpolacek / imagefill.js

The jQuery plugin for making images fill their containers (and be centered)
http://johnpolacek.github.io/imagefill.js/
609 stars 89 forks source link

Suggestion: target specific img #13

Closed PatrikElfstrom closed 9 years ago

PatrikElfstrom commented 9 years ago

I needed to target a specific img and not all img

$('#header-section .image-container').imagefill({
    target: '.image'
});

And I modded the imagefill.js and added filter(settings.target) on all places where the img is targeted.

zumwalt commented 9 years ago

This would indeed be a nice feature.

mediamix commented 9 years ago

Thank you, @PatrikElfstrom for sharing your solution. It's exactly what I was looking for.

johnpolacek commented 9 years ago

I do accept pull requests! :)

johnpolacek commented 9 years ago

Turns out I need this for a project myself. Done!

mediamix commented 9 years ago

Nice! Works a treat. Thanks @johnpolacek