Skip to content

Commit e9e9de8

Browse files
committed
Changed the separator to ; in order to allow use of , which is the OR operator in media queries
1 parent 042ea4c commit e9e9de8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function parseElements(els, mqAttr) {
1717
var mqClasses = [];
1818
Array.prototype.forEach.call(els, function(el) {
1919
var attr = el.getAttribute(mqAttr);
20-
attr.split(',').forEach(function(str){
20+
attr.split(';').forEach(function(str){
2121
str = str.split('>');
2222
var classes = str[0].trim().split(' ');
2323
var query = str[1].trim();
@@ -42,4 +42,4 @@ module.exports = function(els, options) {
4242
var callback = throttle(updateElementClasses.bind(null, classes), 500);
4343
window.addEventListener('resize', callback);
4444
return callback;
45-
};
45+
};

0 commit comments

Comments
 (0)