I am using css media queries on my project to create a site that will work with any sized screen. I am looking to trigger difference jquery functions just like I would with
I had a similar problem with some carousels that must be created on mobile, but destroyed in desktop... and I did not liked the solution of being checking window width in pixels, so I created a small function to "listen" when the mediaquery state changes, without the need of Modernizr.
You can define your own code in every state ("on entering mobile resolution", "on leaving desktop")... and there put your code.
Hope could be useful for someone else ;)
https://github.com/carloscabo/MQBE
(improvements and ideas are welcome ;)