jQuery Events - 16
- Posted: Aug 06, 2012 at 10:30 AM
- 19,394 Views
- 15 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
Right click “Save as…”
This lesson shows how to utilize jQuery Events to create a simple game by writing and attaching anonymous functions to events fired on a web page.
Already have a Channel 9 account? Please sign in
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
There's some subtlety as to why the score variable can retain its value between clicks. I understand it because of my experience with C#, lambda expressions, and closures, but it might not be so obvious to the beginning programmer.
Hi Bob , I really appreciate this series . it is so helpful and enlightening .
I have two questions :
if I have a loop ($.each) and inside I have a nested "if" statement when I am using the "return" keyword in the if statement it returns to the containing "each" statement instead of exit the function. what am I doing wrong ? ie:
$('#btn').click(function () {
var found = false;
$.each(star1, function (i, val) {
if (val == $('#starName').val()) {
found = true;
return ('found!!!'); // although that it is found the loop keep on going
} else {
if (i == (star1.length - 1)) {
if (!found) {
return ('not found');
}//not found
};
};//end else
});//end each
});//end click
My things always go mad
thank you bob tabor
I have never seen www.LearnVisualStudio.net
hi bob tabor my internet NEVER WORKS!!!
Hi Bob, is there a JQuery shortcut for every single Javascript command?
Also, I'm a little confused regarding the src script with the following anchor tag: http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.7.1.js
Are we supposed to download jQuery, or can we just link all of our html files to that address?
Thanks in advance.
@Ali: When you put () around the value you're returning, you confuse javascript ... you're saying you want to call a method called return instead of the keyword. Remove the () around ('found!!!') and I'm betting it will work. Good luck!
@Bob tabor is a idoit: . . . classy. And grammatically challenged.
@plok18644: You're welcome!
@guih6777: How did you miss it!?
@lib115634: Sorry?
@Jacob: re: shortcuts ... I don't think so. Just for the ones that are laborious to write.
@Jacob: re: download ... You only reference THAT SINGLE FILE, the actual jQuery library file --> jquery-1.7.1.js ... it is located at a number of web sites where it can be quickly downloaded (or perhaps even cached, if other web site builders like yourself use the same exact URL to host the file). The remainder of your HTML , CSS and image files will point to YOUR domain name. Hope that helps!
hi bob,
I feel like a devloper.
Thanks.
So if I want to reset the score when I click Start Over, how would the code look like(what do U have to modify)?
@TinTin: Hi TinTin ... I'm am absolutely NOT trying to be a smart aleck in what I'm about to say ... I believe in the "teach a man to fish and he'll fish for himself the rest of his life" philosophy. So, tell me what you've tried already and let me walk you through it if you get stuck. Hopefully if you've been following along up to this point, you should be able to do exactly what you're asking.
If you don't struggle, you don't truly learn.
Hello Bob,
Thank you for the reply, I figured it out, had a bug in my code. The text would reset when I clicked start over, but it would display the score being 0 only after I hovered it one more time :))
It is fixed now.
Thanks for the series!
Hello Bob,
Thank you for the reply, I figured it out, had a bug in my code. The text would reset when I clicked start over, but it would display the score being 0 only after I hovered it one more time :))
It is fixed now.
Thanks for the series!
need videos related to proxy in javascript
Remove this comment
Remove this thread
close