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.
Ok I have found a complete working solution. First of all thanks to Neil_Bradley for the window width tip. I combined this with the plug-in to calculate the ems:
More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.
In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX.
The logical flow for the problem should be:
Write an event handler for the first drop down box to get …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors.
Create your external css file by saving it as style.css then set up your style tags:
Reference the nav tag and set your prop…