Releases: Snugug/eq.js
Releases · Snugug/eq.js
All Query
JavaScript Constructor
You can now construct an EQ from JavaScript!
var component = document.querySelector('.component');
eqjs.definePts(component, {
small: 400,
medium: 600,
large: 900
});
v1.7.1
How Eventing
Custom events have been added, allowing you to add an event listener for eqResize
to your element that will fire after a resize event has taken place on it!
(function () {
'use strict';
window.addEventListener('DOMContentLoaded', function () {
var foo = document.getElementById('foo');
foo.addEventListener('eqResize', function (e) {
console.log(e);
if (e.detail && e.detail.indexOf('medium') >= 0) {
console.log("It's at least medium!");
}
});
});
}());
CSS Only Element Queries!
Add eq.js
to your site, then use the eq-pts
mixin to set up your element query points and the eq-selectors
mixin so eq.js
can hook in to it! See the updated README for full awesome on how to use this new option.
Also in this release:
- Two versions of eq.js available, one with polyfills and one without
- Include GZip versions of libraries
- Banners are now working properly
- Fixed IE8/Outdated Browser compatibility issues introduced in v1.5.0 (now defunct)
CSS Only Element Queries!
Add eq.js
to your site, then use the eq-pts
mixin to set up your element query points and the eq-selectors
mixin so eq.js
can hook in to it! See the updated README for full awesome on how to use this new option.