O'Reilly logo

Mastering jQuery by Alex Libby

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

Handling animation requests on a responsive site

The best route to animate content within a responsive site when working with jQuery might actually seem a little perverse: don't use jQuery unless you absolutely have to! At this point, you may think I have completely lost the plot, but here are a few good reasons for this:

  • jQuery is not optimized for animation; the line of demarcation between styles in the style sheet, HTML, and JavaScript will start to blur, which means that we lose control over how our content is styled.
  • Animation doesn't work well on mobile devices when done with jQuery; to improve performance, additional CSS styling has to be used.
  • We lose control over which rules are applied to specific elements due to CSS specificity—keeping ...

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