
Show HN: Tip Calculator – A simple project I made to learn jQuery - chickenmonkey
https://codepen.io/hsrinivasulu/pen/Baymezb?editors=1010
======
codedestroyer
to reduce dom transversal you should assign selectors to variables. var tipBtn
= $(".tip_btn");

then anytime you use tipBtn it has a saved reference to the dom node, if you
repeat selectors they recalculate each use.

~~~
chickenmonkey
That's helpful. Thanks!

