作者:empty 页数:431 出版社:empty |
About Earle Castledine
Sporting a Masters in I formation Technology and a lifetime of experience on the Web ofHard Knocks, Earle Castledine fak aMr Speaker) holds an interest in everything computer y.Raised in the wild by various 8-bit home computers, he settled in the Internet during themid-nineties and has been living and working there ever sinceA Senior Systems Analyst and JavaScript flaneur, he is equally happy in the muddy pits of.NET cn de, the dense foliage of mobile apps and games, and the fluffy clouds of clientsideinteraction development.Asco-creator of the client-side opus Turn Tube list, 'as well as countless web based experi-ments, Earle recognizes the Internet not as a lubricant for social change but as a vehicle forunleashing frivolous ECMAScript gadgets and interesting timewasting technologiesAbout Craig Shark ieA degree in FineArt is a strange entrance to a career with a pass lon for program iming.butthat's where Craig started.A right-brain approach to code and problem solving has seen himplying his craft for many of the big names of the Web-AOL, Microsoft, Yahoo l, Ziff Davis,and now Atlassian.That passion, and a fondness for serial commas and the like, have led him on a path fromjour alism, through development, on to conferences, and now into print.Taking up JavaScriptin 1995.he was an evangelist for the“good parts he for eC rockford coined the term, and nowhas brought that keenness to j QueryAbout the Technical EditorLouis Simoneau joined SitePoint in 2009.after traveling from his native Montreal to Calgary.Taipei, and finally Melbourne.He now gets to spend his days learning about cool webtech-nologies, an activity that had previously been relegated to nights and weekends.He enjoyshiphop.spicy food, and all things geekyAbout the Chief Technical OfficerAs Chief Technical Off cer for SitePoint, Kevin Yank keeps abreast of all that is new andexciting in web technology.Best known for his book, Build Your Own Database Driven WebSite Using PHP占MySQL, he also co-authored Simply Jo vaSe rip r with Cameron Adams andhttp:/www.umtubels.com/Everything You Know About CSS Is Wrong!with Rachel Andrew.In addition, Kevin hoststhe SitePoint Podcast and co-writes the SitePoint Tech Times, a free email newsletter thatgoes out to over 240, 000subseribers worldwide.Kevin lives in Melbourne, Australia and enjoys speaking at conferences, as well as visitingfriends and fam lly in Canada.He's also passionate about performing improvised comedytheater with Impro Melbourne(http://www.impromelbourne.com.au/andflyinglightaircraft.Kevins personal blog is Yes, Im Canadian(http://yesimcanadian.com/] .About SitePointSite Points pecilzesinpublihingfun, pract cal, and easy to-understand content for Webprofessionals.Visithttp://www.sitepoint.com/toaccessourblogs.books, newsletters.articles,and community forums.
No matter what kind of ninja you are—a cooking ninja, a corporate lawyer ninja, oran actual ninja ninja—virtuosity lies in first mastering the basic tools of the trade.Once conquered, its then up to the full-fledged ninja to apply that knowledge increative and inventive ways.In recent times, j Query has proven itself to be a simple but powerful tool for tamingand transforming webpages, bending even the most stubborn and aging browsersto our will.j Query is a library with two principal purposes:manipulating elementson a webpage, and helping out with Ajax requests.Sure, there are quite a fewcommands available to do this-but they're all consistent and easy to learn.Onceyou've chained together your first few actions, you'l be addicted to the j Querybuilding blocks, and your friends and family will wish you'd never discovered it!OntopofthecorejQuerylibraryisjQueryUl:asetoffine-lookingcontrolsandwidgets(such as accordions, tabs, and dialogs) , combined with a collection of full-featured behaviors for implementing controls of your own.j Query Ul lets you quicklythrow together awesome interfaces with little effort, and serves as a great exampleof what you can achieve with a little j Query know-how.At it score, j Query is a tool to help us improve the usability of our sites and createa better user experience.Usability refers to the study of the principles behind anobject'perceived efficiency ore leg once, Far from being merely flashy, trendy design,j Query lets us speedily and enjoyably sculpt our pages in ways both subtle and ex-treme:fromfinessingasimpleslidingpaneltoimplementingabrand-newuserin-teraction you invented in your sleep.Becoming a ninja is n't about learning an APl insideout and back to front-thatsjust called having a good memory, The real skill and value comes when you canapply your knowledge to making something exceptional:something that builds onthe combined insights of the past to be even slightly better than anything anyonehas done before.This is certainly not easy-but thanks to j Query, it's fun just trying.Who Should Read This BookIf you're a front-end webdesigner looking to add a dash of cool interactivity to yoursites, and you've heard all the buzz about j Query and want to find out what the fussis about, this book will put you on the right track.If you've dabbled with JavaScript,but been frustrated by the complexity of many seemingly simple tasks, we'll showyou how j Query can help you.Even if you're familiar with the basics of j Query.butyou want to take your skills to the next level, you'll find a wealth of good codingadvice and in-depth knowledge.You should already have intermediate to advanced HTML and CSS skills, as j Queryuses CSS-style selectors to zero in on page elements.Some rudimentary programmingknowledge will be helpful to have, as j Query-despite its clever abstractions—isstill based on JavaScript.That said, we've tried to explain any JavaScript conceptsas we use them, so with a little willingness to learn you'TI do tine.What'sin This BookBy the end of this book, you'l he able to take your static HTML and CSS webpagesand bring them to life with abit of j Query magic.You'll learn howto select elementson the page, move them around, remove them entirely, add new ones with Ajax,animate them...in short, you'II he able to bend HTML and CSS to your will!Wealso cover the powerful functionality of the j Query UI libraryThis book comprises the following nine chapters.Read them in order from beginningto end to gain a complete understanding of the subject, or skip around if you onlyneed a refresher on a particular topic.Chapter1:FallinginLovewithjQueryBefore we dive into learning all the ins and outs of j Query, we'll have a quicklook at why you'dwanttouseitinthefirstplace:whyit'shetterthanwritingyour own JavaScript, and why its better than the other JavaScript libraries outthere.Well brush upon some CSS concepts that are key to understandingj Query, and briefly touch on the basic syntax required to call j Query into action.Chapter2:Selecting, Decorating, and EnhancingOstensibly.j Query's most significant advantage over plain JavaScript is the easewith which it lets you select elements on the page to play with.Well start off
Evi at in Wa ming:The document was created w thS pre.PDF for.NET.xixthis chapter by teaching you howto use j Query's selectors to zero in on yourtarget elements, and then we'll look at how you can use j Query to alter thoseelements'CSS properties.Chapter3:Animating.Scrolling, and ResizingjQueryexcelsatanimation:whetheryou'dliketogentlyslideopenamenu,orsend a dialog whizzing across the screen.j Query can help you out.In thischapter.we'll explore j Query's wide range of animation helpers, and put theninto practice by enhancing a few simple userinterface components.Well alsohave a quicklook at some animation-like helpers for scrolling the page andmaking elements resizable.Chapter4:Images, Slideshows, and Cross-fadingWith the basics well and truly under our belts, we'll turn to building some ofthe most common j Query widgets out there:image galleries and slideshows.Well learn howto build lightbox displays, scrolling thumbnailgalleries, cross-fading galleries.and even take a stabat an i Photo-style flip-bookChapter5:Menus, Tabs, Tooltips, and PanelsNow that we're comfortable with building cool UI widgets with j Query.welldiveintosomeslightlymoresophisticatedcontrols:drop-downandaccordion-web application.In this chapter, well learn what j Query has to offer us in termsthe fly.offer assistance to our users, and manipulate checkboxes, radio buttons,like date pickers, sliders, and drag and drop.We'l round it off with a look atdata, and transform tables into data grids with sophisticated functionality.developer:a fantastic plugin architecture, a highly extensible and flexible core,style menus, tabbed interfaces, tooltips, and various types of content panelsWe'rereallyonarollnow:oursitesarelookinglessandlesslikethebrochure-style pages of the nineties, and more and more like the Rich Internet Applicationsof the twenty-first century!Chapter6:Construction, Ajax, and InteractivityThis is the one you'veallbeenwaitingfor:Ajax!Inordertomaketrulydesktop-style applications on the Web, you need to be able to pass data back and forthto and from the server, without any of those pesky refreshes clearing your inter-face from the screen-and that's what Ajax is all about.j Query includes a raftof convenient methods for handling Ajax requests in a simple, cross-browsermanner, letting you leave work with a smile on your face.But before we get toocarried away—our code is growing more complex, so we'd better take a look atsome bestpractices for organizing it.All this and more, in Chapter 6.Chapter7:Forms, Controls, and DialogsThe bane of every designer, forms are nonetheless a pivotal cornerstone of anyof simplifying our form-related scripting.We'll learn howto validate forms onand select lists with ease.Then we'll have a look at some less conventionalways of allowing a site's users to interact with it:a variety of advanced controlsmodal dialogs in the post-popup world, as well as a few original non modalnotification styles.What a chapter!Chapter8:Lists, Trees, and TablesNo matter how“Web 2.0”your application maybe, chances are you'll still needto fallback on the everyday list, the humdrum tree, or even the of t-derided tableto present information to your users.This chapter show show j Query can makeeven the boring stuff fun, as we'll learn howto turn lists into dynamic, sortableChapter9:Plugins, Themes, and Advanced Topicsj Query is more than just cool DOM manipulation, easy Ajax requests, and funkyUI components.It has a wealth of functionality aimed at the more ninja-levelcustomizable events, and a whole lot more.In this chapter, well also cover thej Query UI theme system, which lets you easily tailor the appearance of j QueryUI widgets to suit your site, and even make your own plugins skinnable withthemes.Where to Find Helpj Query is underactive development, so chances are good that, by the time you readthis, some minor detail or other of these technologies will have changed from what'sdescribed in this book.Thankfully.SitePoint has a thriving community of JavaScriptand j Query developer sTeady and waiting to help you out if you run into trouble.We also maintain a list of known errata for this book, which you can consult for thelatest updates; the details are below.
Preface...xvii
1.Falling in Love with j Query.....1
2.Selecting, Decorating, and Enhancing....17
3.Animating, Scrolling, and Resizing......51
4.Images and Slideshows.....91
5.Menus, Tabs, Tooltips, and Panels.....135
6.Construction, Ajax, and Interactivity...181
7.Forms, Controls, and Dialogs....231
8.Lists, Trees, and Tables....291
9.Plugins, Themes, and Advanced Topics....333
A.Reference Material....373
B.JavaScript Tidbits.....381
C.Plugin Helpers....387
Index......393
BY EARLE CASTLEDINE
&CRAIG SHARK IE