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.

Intro to jQuery: Learn jQuery with Street Fighter and Hadoukens

35 pointsby carlsednaouiover 11 years ago

11 comments

sparkygoblueover 11 years ago
Consider caching your element selectors like this:<p>var $image = $(&#x27;#my-div img&#x27;);<p>This way jQuery doesn&#x27;t have to traverse the DOM more than once to select the element.<p>Also, I believe you can do all of your mousedown() event code in one block.<p>Edit: oops, upon further inspection, I see you are doing this all in the console. Caching the selector is still possible, but now I understand why you did the mousedown() event the way you did.
评论 #6796401 未加载
jeniusover 11 years ago
+1 for the share button up top (<a href="https://github.com/carrot/share-button" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;carrot&#x2F;share-button</a>) - but adjust that hover color to blue or grey!<p>&lt;&#x2F;shameless plug&gt;
评论 #6795178 未加载
tsumniaover 11 years ago
Nice! I actually used a horrible version of Street Fighter for my Intro to Programming course. We were learning conditionals, so I thought, &quot;Why not teach them character selection and Event listeners?&quot; A little confusing, but kept everyone interested.
评论 #6795174 未加载
1337bizover 11 years ago
Thank you! If I can make one suggestion it would be to add somewhat at the end a demo of the final project. The first thing I do with tutorials is always to scroll to the end and see what I am going to end up with.
评论 #6795142 未加载
hodgesmrover 11 years ago
While I applaud the time the author took to write this, isn&#x27;t the message a bit misguided? Wouldn&#x27;t it be more useful to encourage people to &quot;Learn JavaScript and how to read an API&quot;?
评论 #6795212 未加载
Cederfjardover 11 years ago
I&#x27;m not able to scroll down the page on my iPad - it doesn&#x27;t seem to hang, I just can&#x27;t scroll. Any idea why?<p>Will definitely check it out when I&#x27;m on my laptop, seems cool!
评论 #6795275 未加载
alevans4over 11 years ago
What is the purpose of the opacity fade at the bottom? Stylistic? I&#x27;d really rather be able to see everything clearly. Looks like there is some good content otherwise.
评论 #6796477 未加载
nopeaviover 11 years ago
Enjoyable read, but that share button was annoyingly as all hell. Easy enough to delete, though, as we were already in the web inspector.
adsrover 11 years ago
Just wanted to mention that this console is available in Safari as well, presumably a consequence of webkit.
评论 #6795547 未加载
libriaover 11 years ago
Really neat and approachable tutorial with clear goals. Effective instruction is difficult, so good work!
评论 #6795538 未加载
t3hprofitover 11 years ago
while it&#x27;s a bit of a face dive into jQuery, this is amazing.
评论 #6795064 未加载