Ebook Pragmatic Guide to JavaScript

Pragmatic Guide to JavaScript
Pragmatic Guide to JavaScript

Download

THÔNG TIN TÀI LIỆU

Nhà xuất bản Christophe Porteneuve
Tác giả Christophe Porteneuve
Số trang 141
Ngày xuất bản 2010
File PDF

NỘI DUNG TÀI LIỆU
I Bread and Butter: Pure JavaScript 16
Task 1. Dynamically Selecting a Method/Property 18
Task 2. Achieving Code Privacy with the Module Pattern 20
Task 3. Using Optional, Variable, and Named Arguments 22

II The DOM, Events, and Timers 24
Task 4. Obtaining References to DOM Elements 26
Task 5. Dynamically Styling Content 28
Task 6. Changing an Element’s Contents 30
Task 7. Running Code When the DOM Is Loaded 32
Task 8. Listening for Events (and Stopping) 34
Task 9. Leveraging Event Delegation 36
Task 10. Decoupling Behaviors with Custom Events 38
Task 11. Simulating Background Processing 40

III UI Tricks 42
Task 12. Pulling Off Classy Tooltips 44
Task 13. Making Unobtrusive Pop-Ups 46
Task 14. Preloading Images 48
Task 15. Creating a Lightbox Effect 50
Task 16. Implementing an “Infinite Scroll” 52
Task 17. Maintaining Viewport When Loading Content 54

IV Form-fu 56
Task 18. Temporarily Disabling a Submit Button 58
Task 19. Providing Input Length Feedback 60
Task 20. (Un)checking a Whole Set of Checkboxes at Once 62
Task 21. Validating Forms: The Basics 64
Task 22. Validating Forms: Going Further 66
Task 23. Validating Forms: The Whole Nine Yards 68
Task 24. Providing On-the-Fly Help Tooltips on Forms 70
Task 25. Autocompleting Input As It’s Typed 72
Task 26. Using Dynamic Multiple File Uploads 74

V Talking with the Server Side 76
Task 27. Reading/Writing Cookies 78
Task 28. Loading Stuff Through Ajax (Same Domain) 80
Task 29. Using JSON 82
Task 30. Using JSON-P 84
Task 31. Cross-Domain “Ajax” (Take 1) 86
Task 32. Cross-Domain “Ajax” (Take 2) 88

VI Making Mashups 90
Task 33. Syndicating Your Twitter Updates 92
Task 34. Syndicating Your Flickr Updates 94
Task 35. Geocoding a Location and Getting Photos For It 96

Be the first to comment

Leave a Reply

Your email address will not be published.

*