Closed lewiscoulson closed 9 years ago
Hello @lewiscoulson :-)
Thanks for this contribution! :-)
Is there anything preventing you to assign this proposed function to HTMLElement.prototype.querySelectorAll
?
I would like to support older browsers but I would not like the library size to carry too much useless code for modern browsers.
@oncletom I don't believe IE7 allows you to bind to HTMLElement
:-(
OK I see :-(
Hello @lewiscoulson,
I will not merge this PR for several reasons:
selector
to make elements responsive;querySelectorAll
would need solid tests to be shipped in Imager with confidence;In your case, you could simply do this to make it work with Imager:
var imgr = new Imager(querySelectorAll('.responsive-img'));
// with jQuery
var imgr = new Imager(jQuery('.responsive-img'));
// with jQuery aliased as $
var imgr = new Imager($('.responsive-img'));
Let us know how it goes for you :-)
Hey @oncletom
No worries, thanks for the feedback :)
Requirements for the project i'm currently working on changed at last minute and now include support for IE7. By changing the implementation of querySelectorAll as per - https://gist.github.com/icodeforlove/868532 Imager.js can work in IE7. Might be handy for other Developers who find themselves in a similar situation.