Optimizing duplicate jQuery selectors (refs #19051)