jQuery essentials : optimize and implement the features of jQuery to build and maintain your websites with minimum hassle / Troy Miles.
Material type: TextSeries: Community experience distilledPublisher: Birmingham : Packt Publishing, 2016Description: 1 online resourceContent type:- text
- computer
- online resource
- 9781785282652
- 1785282654
- 005.2762 23
- QA76.73.J39
Online resource; title from PDF title page (EBSCO, viewed November 16, 2016)
Includes index.
Annotation Optimize and implement the features of JQuery to build and maintain your websites with minimum hassleAbout This Book Build dynamic websites efficiently without any performance issues Learn to use existing jQuery plugins and or write your own for your websites This is the most up-to-date book on the market at the moment, packed with detailed explanations and real-world examplesWho This Book Is ForWhether you are a beginner or an experienced developer who is looking for quick answers, you will find what you need in this book.What You Will Learn Quickly find and modify HTML DOM elements Use animation to add flair to your site Create your own events to decouple your application Measure the performance of your website's JavaScript Write unit tests to ensure that your application is behaving correctly Use plugins to save reinventing the wheel and enhance your site quickly Use client-side validation on forms to prevent your users from sending bad data to your application Write your own jQuery plugins in order to encapsulate your company's business logicIn DetailJQuery is still the most popular JavaScript library. It is used in over 60% of the top websites on the Internet. It was written to make DOM manipulation (so, moving things around a web page) easier for developers. It acts through JavaScript to ascribe HTML elements to the DOM attributes. Because it is a library of predefined functions, all you need to start using jQuery is a working knowledge of the syntax and a reference for the functions available to you.This practical guide shows you how to make the most of jQuery to boost the performance of your websites and applications. We start off with a quick glance through the basics of JQuery, followed by the explanation of JQuery selectors, filters, and DOM element manipulation. After this, you will learn how events and animations can be used to create and design beautiful and user-friendly sites. Next, you will be familiarized with Ajax functions to help you send and receive data from your server. Finally, we'll walk you through using built-in plugins and eventually create your own plugins for your websites.By the end of this book, you will be able to build robust and efficient websites successfully using JQuery.Style and approach This book takes a fast but thorough walk through jQuery. The goal is to get you writing fast and efficient jQuery quickly. It uses easy-to-read, jargon-free text and lots of ready-to-use code examples.
Cover ; Copyright; Credits; About the Author; About the Reviewers; www.PacktPub.com; Table of Contents; Preface; Chapter 1: jQuery Part by Part ; Life before jQuery; Why was jQuery created?; The major components of jQuery; The DOM selection; DOM manipulation; Events; Form; CSS and animation; Ajax; Helpers; Why are there two maintained versions of jQuery?; The difference between minified and un-minified versions; What is a content delivery network?; Summary; Chapter 2: jQuery Selectors and Filters ; jQuery selectors; The chapter code; Protocol-relative URLs; The jQuery object
Creating selectorsID selectors; Class selectors; Tag selectors; Combining selectors; Descendent selectors; Attribute selectors; Creating basic filter selectors; Content filters; Using chaining to quickly and neatly continue queries; Summary; Chapter 3: Manipulating the DOM ; Dimensions and positions; Examples; Developer tools; Reading the size of the screen and elements; Classes and styles; The JSON object; Behavior classes; Attributes and properties; Keeping images proportional; Removing attributes and properties; Summary; Chapter 4: Events ; The ready event; Hooking events; Unhooking events
Namespacing eventsThe event handler; The event object; event.target; event.relatedTarget; event.type; event.which; event.metaKey; event.pageX and event.pageY; event.originalEvent; Passing data to an event; Event shorthand methods; Creating your own events; Triggering events; The death of the .live() and .die() methods; Looking deeper at .on(); Summary; Chapter 5: Making your site snazzy with jQuery ; The importance of animations; Hiding and showing elements; .fadeOut(); .fadeIn(); .fadeToggle(); Sliding elements around; .slideUp(); .slideDown(); .slideToggle(); Creating custom effects
.Animate().delay(); .queue(), .dequeue(), and .clearQueue(); .stop() and .finish(); jQuery.fx.interval and jQuery.fx.off; Using effects correctly; Summary; Chapter 6: Better Forms with jQuery ; Employing form methods; .submit(); .focus(); .blur(); .focusin() and .focusout(); .change(); .select(); Tooltips; Placeholder; Enabling and disabling elements; Validation; Filtering out unwanted characters; Summary; Chapter 7: Talking to your Server ; Before jQuery; How jQuery helps us; Loading HTML -- .load(); Loading JSON Data -- .getJSON(); Loading and executing JavaScript -- getScript()
Reading and writing data: jQuery.get() and .jQuery.post()Helper methods; Creating query data -- .param(); Creating query data from a form -- .serialize(); Creating an object from form data -- .serializeArray(); Ajax events; When an Ajax request begins -- .ajaxStart(); When an Ajax request completes -- .ajaxStop(); When an Ajax request sends data -- .ajaxSend(); When an Ajax request fails -- .ajaxError(); When an Ajax request succeeds -- .ajaxSuccess(); When an Ajax request finishes -- .ajaxComplete(); Summary; Chapter 8: Writing Code that You can Read Later ; Separation of concerns
eBooks on EBSCOhost EBSCO eBook Subscription Academic Collection - Worldwide