Simple Magento (jQuery) Quantity Increment Script

Magento's themes and extensions aren't always of the highest quality, and when I ran into an issue on one of my client's Magento sites that the quantity increment and decrement arrows didn't work on the single product page (product/view.phtml) I tossed in the following quick jQuery code to make it work. Adjust as need be for class names and IDs of course.

Oh before we read the code something to quickly mention, the specific theme that client was using has some odd jQuery problems so we had to write the usual opening jQuery function slightly different than normal. So we used this and it worked perfectly fine to detect the “$”:

Here is the full quantity jQuery increment and decrement code that I just stuck at the bottom of the template:

 

>