I'm trying to use matchMedia in Jquery so that the script will draw smallBlock when the browser is 479px wide or less and draw largeBlock on every other size.
Here is the full script code: The first part of the script is TweenMax and the second part is my script. https://jsfiddle.net/h0eu0edd/
You can see the rectangle being drawn on here (http://imdarrien.com/#)
function handleScreen(mql) {
if (mql.matches) {
smallBlock();
} else {
largeBlock();
}
}