Beginning jQuery

Book description

Beginning jQuery is your step-by-step guide to learning the jQuery library. jQuery is the most popular JavaScript library in the web developer's toolkit. Jack Franklin takes you from the basics of getting you started with jQuery, right through to extending jQuery by writing your own plug-ins. You'll discover best practices you can follow, how you can avoid common mistakes, and you'll learn about so many of the things that jQuery has to offer, including how you can:

  • Use jQuery's powerful tools to dynamically update content on your site, including DOM manipulation.

  • Extend jQuery's capabilities by writing your own plugins on top of the framework.

  • Animate elements and build your own jQuery slider.

  • Employ best practices and avoid common errors made by beginners.

  • JavaScript is a powerful language but every web developer must navigate the tricky issues around cross-browser inconsistencies. Beginning jQuery teaches you how to use jQuery to avoid spending your time fixing these browser bugs - letting you concentrate on what really matters to you. Throughout Beginning jQuery, you'll discover how expressive yet concise jQuery's code is and how much quicker and efficient you can develop with jQuery!

    What you'll learn

  • Learn why jQuery is so popular and how to get started.

  • Use jQuery's powerful manipulation tools to dynamically update your website's content.

  • Animate content and build your own image slider with jQuery's animation tools.

  • Extend the library by writing your own custom plug-ins.

  • Avoid common beginner errors, and learn how to use best practices.

  • Use plug-ins created by others in the community and integrate them into your website.

  • Who this book is for

    Beginning jQuery is for the web developer confident with HTML and CSS and now ready to get to grips with JavaScript. If you've tried to integrate some JavaScript into your website and wondered how you could add functionality easier, jQuery is for you. Beginning jQuery is great for the developer wanting to enhance their skillset and learn new tools.

    Table of contents

    1. Title Page
    2. Dedication
    3. Contents at a Glance
    4. Contents
    5. Foreword
    6. About the Author
    7. About the Technical Reviewer
    8. Acknowledgments
    9. CHAPTER 1: JavaScript You Need to Know
      1. Using JavaScript on a Web Page
      2. Syntax Conventions
      3. Variables
      4. Functions
      5. Conditionals
      6. Debugging with the Console
      7. Arrays
      8. Loops
      9. More console.log( )
      10. Summary
    10. CHAPTER 2: The Basics of jQuery
      1. The Document Object Model (DOM)
      2. Downloading jQuery
      3. The jQuery API Documentation
      4. Writing Some jQuery
      5. Summary
    11. CHAPTER 3: Traversing the DOM
      1. CSS Selectors in jQuery
      2. Traversal Methods
      3. Further Traversal
      4. Chaining Methods
      5. Further Filtering
      6. Summary
    12. CHAPTER 4: DOM Manipulation with jQuery
      1. CSS
      2. animate( ) and Animation Convenience Methods
      3. Attributes and Properties
      4. text( ) and html( )
      5. Removing Elements from the DOM
      6. Creating New Elements
      7. Inserting into the DOM
      8. Efficient DOM Insertion
      9. Summary
    13. CHAPTER 5: An Introduction to Events
      1. Popular Events
      2. Interacting with the Element
      3. Triggering Events
      4. Unbinding from Events
      5. The Event Object
      6. Building an Accordion
      7. Summary
    14. CHAPTER 6: More Events
      1. Event Delegation
      2. Event Propagation
      3. Preventing Default Behavior
      4. Your Own Events
      5. The Accordion, Take 2
      6. Summary
    15. CHAPTER 7: Animation
      1. The animate( ) Method
      2. More Convenience Methods
      3. The Animation Queue
      4. Fixing Your Accordion
      5. The Image Slider
      6. Summary
    16. CHAPTER 8: Ajax with jQuery
      1. JSON
      2. Parsing JSON in JavaScript
      3. Ajax with jQuery
      4. A Real API: Dribbble
      5. Summary
    17. CHAPTER 9: Writing a jQuery Plug-in
      1. Why a Plug-in?
      2. Your First jQuery Plug-in
      3. Improvements
      4. Immediately-Invoked Function Expressions
      5. Giving the User Options
      6. Adding Options to Your Plug-ins
      7. The Accordion Plug-in
      8. Adding Callback Support
      9. Summary
    18. CHAPTER 10: More jQuery Plug-ins
      1. The Dribbble API Plug-in
      2. The getShots method
      3. Improving getShots
      4. Minifying Your Code
      5. More Refactoring
      6. Documentation
      7. Summary
    19. CHAPTER 11: A jQuery Image Slider
      1. Plan of Attack
      2. Project Setup
      3. Plug-in Setup
      4. Infinitely Looping
      5. Catch Up
      6. Keeping Track
      7. Keyboard Support
      8. Automatic Animation
      9. Bug Fixing
      10. Summary
      11. Conclusion
    20. Index

    Product information

    • Title: Beginning jQuery
    • Author(s):
    • Release date: January 2013
    • Publisher(s): Apress
    • ISBN: 9781430249320