TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Tip Calculator – A simple project I made to learn jQuery

5 pointsby chickenmonkeyover 5 years ago

1 comment

codedestroyerover 5 years ago
to reduce dom transversal you should assign selectors to variables. var tipBtn = $(&quot;.tip_btn&quot;);<p>then anytime you use tipBtn it has a saved reference to the dom node, if you repeat selectors they recalculate each use.
评论 #21998268 未加载