O'Reilly logo

Responsive Mobile Design: Designing for Every Device by Phil Dutson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 12. Conditional JavaScript

Even when you have started mobile-first with your design, paid careful attention to your content and created a true masterpiece, you still need to worry about precise interaction methods. What works for your desktop users may not work at all for your mobile users. By that same token, what works on a tablet may not work on a phone. This is where adding some conditional JavaScript can make all the difference.

Why Conditional JavaScript

When you start thinking about how users will interact with your site, you need to make sure that you are giving them the control they expect to be successful. This holds true for every element or component of your site that will offer any degree of interaction.

To help wrap your ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required