Essential JavaScript Design Patterns For Beginners
This is a good, if long-winded document. At over 100 pages, it will take a dedicated reader to sift the gold.As other patterns covered display aspects of DRY-ness with JavaScript, let's take a look at how to write DRY code using jQuery. Note that where jQuery is used, you can easily substitute selections using vanilla JavaScript because jQuery is just JavaScript at an abstracted level.That is jibberish, and it shows in the code examples: Using an ES5 shim is best-practice these days, so that you can use Array.prototype.forEach and not jQuery.each (with its weird argument order), amongst other things that are commonplace in modern JavaScript code. Yet the auther defers to jQuery throughout.As jQuery is accepted as one of the best options for DOM-manipulation and selection, we'll be using it for our DOM-related examples.More likely that the document is filled with jQuery because the author is heavily involved with the jQuery project, no?