Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use polyfill for specific classes #1

Open
RazielleS opened this issue Nov 18, 2015 · 1 comment
Open

Use polyfill for specific classes #1

RazielleS opened this issue Nov 18, 2015 · 1 comment

Comments

@RazielleS
Copy link

Hi there

First thank you for the great work!

I already used this polyfill and it worked great when using the data attribute.

Would it be possible to also include the possibility to use it for arbitrary selectors without specifying the data attribute?
Sometimes there are cases, especially in a CMS, where we can only change a class or a class from an outside element.

It would be great if we could use it for example like this

objectFitPolyfill('.selector .to .image)
// or jQuery version
$('.selector .to .image').objectFitPolyfill()

Thanks, Razrael

@fregante
Copy link

With this one you can: https://github.com/bfred-it/object-fit-images

objectFitImages('.selector .to .image');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants