I am building a responsive website in which I use css3 media queries to detect the width in ems of the browser. For example:
<link href="/css/tablet-desktop.css" rel="stylesheet" media="all and (min-width: 33.236em)">
However I would like to disable certain JQuery functions for certain widths. For example I may want to disable an image magnifier for a product page when viewed on a mobile device. I may also want to disable the jQuery UI tabs function so the tabs collapse on top of each other when on a mobile device.
Is there a way to detect the width in ems of a browser in jQuery then use this to disable some jQuery functions?
Incidentally I do use modernizr but could not find any suitable functions to help me.
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Learn how to create flexible layouts using relative units in CSS. New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).