JoshBarr / on-media-query

A neat way to trigger JS when media queries change. No jQuery required.
283 stars 33 forks source link

Make default fn possible. #28

Closed lukasoppermann closed 7 years ago

lukasoppermann commented 10 years ago

Hey @JoshBarr with just a one line change (namely adding size at line 151 into the callback as an argument) one can use the notation for multiple context e.g. [skinny, desktop] as a default function.

If you do not need to do anything but set a class, this is a very neat and small solution. Please merge this pull request and update it on bower.