©  Ray Nicholus 2016

Ray Nicholus, Beyond jQuery, 10.1007/978-1-4842-2235-5_7

7. Styling Elements

Ray Nicholus

(1)Johnson Creek, Wisconsin, USA

If you are used to using jQuery’s css() method to work with styles in your document, this chapter is for you. I can certainly relate to blind dependence on this magical aspect of the API. Adjusting the dimensions, color, opacity, and any other style imaginable is really easy to do with the help of jQuery. Unfortunately, this simplicity sometimes comes at a substantial cost.

jQuery’s internal code that backs its easy-to-use CSS API has some notable performance issues. If you value efficiency, and if you want to provide your users with an optimal experience, you should learn how to properly manipulate and read ...

Get Beyond jQuery now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.