Using media queries in javascript