The first library we'll look at is jQuery. jQuery isn't as hot as it once was, but it's still the most popular JavaScript library on the planet, and understanding the quirks of using SVG with jQuery is still potentially useful.
Since jQuery functions as a friendly replacement for common DOM interactions, this section will feature a jQuery-based rewrite of the DOM manipulator demo we worked on in Chapter 6, JavaScript and SVG.
It uses the exact same markup, so the only place we need to look at in this chapter is the script block at the bottom.Â
The first thing we'll look at is the function we'll fire on jQuery's equivalent of the DOMContentLoaded event, $(document).ready(). $(document).ready() takes a function as an argument. As the name implies, that function...