Chapter 9: Leveraging JavaScript, jQuery, and AJAX Scripts

JavaScript libraries, especially the very popular jQuery library along with its numerous plugins, can do wonders in bringing a website to life with slick animations, dynamic data queries, and advanced graphical features. Unfortunately, for all of their benefits, these scripts can also be difficult to work with. For example, loading more than one copy of jQuery can destroy everything that was set up by another instance, and errors in one script usually prevent other scripts from running correctly.

WordPress' answer to this convoluted architecture is twofold. As a first step, it comes pre-packaged with a copy of jQuery and many other popular JavaScript libraries that plugin developers ...

Get WordPress Plugin Development Cookbook - Third Edition 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.