Just slipping some vanilla code into the jQuery he already had.
Realistically, there is no reason at all to use jQuery for any of that code in post #18.
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.