Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Update how-jquery-works.md
I'm a complete newbie here (i.e. your audience), so I although I guessed I was supposed to put the jQuery snippet somewhere, I wasn't clear where. Was I supposed to put it in the jquery.js which I had just downloaded? Or in the HTML file somewhere? I wasn't sure. Eventually I figured out it belonged in the HTML file where it was written "// Your code goes here' (and felt stupid for not realising that). Anyway, I recommend making these instructions even more explicit.
  • Loading branch information
githubshrek committed Jun 20, 2014
commit 9fe7dca52ca027b27719cfb20a6070df4031b203
2 changes: 1 addition & 1 deletion page/about-jquery/how-jquery-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ $( document ).ready(function() {
});
```

Save your HTML file and reload the test page in your browser. Clicking the link should now first display an alert pop-up, then continue with the default behavior of navigating to http://jquery.com.
Copy the above jQuery code into your HTML file where it says '// Your code goes here'. Then, save your HTML file and reload the test page in your browser. Clicking the link should now first display an alert pop-up, then continue with the default behavior of navigating to http://jquery.com.

For `click` and most other [events](http://api.jquery.com/category/events/), you can prevent the default behavior by calling `event.preventDefault()` in the event handler:

Expand Down