I m currently using enquire.js to identify my media queries which are:
breakpoints[extra_large_devices] = only screen and (min-width: 1098px);
breakpoints[large_devices] = (min-width: 992px);
breakpoints[medium_devices] = (min-width: 768px);
breakpoints[small_devices] = (min-width: 544px)
breakpoints[extra_small_devices] = (min-width: 0px);
I need my js to fire for medium_devices so I worte:
Drupal.Breakpoints.register('medium_devices', {
match: function() {
console.log("match");
},
unmatch: function() {
console.log("unmatch");
},
});
So from 0 to 767 I get unmatched. From 768 on I get matched. The problem is I want the unmatch to be firing at 992px too. So basically I need my script to work from 768 to 991 so rather than macth I need to identify the "active" media query. Any ideas how to solve this? Thanks