没有合适的资源?快使用搜索试试~ 我知道了~
MooTools Essentials
4星 · 超过85%的资源 需积分: 9 112 下载量 201 浏览量
2008-09-21
00:44:14
上传
评论
收藏 1.4MB PDF 举报
温馨提示
试读
275页
The Official MooTools Reference for JavaScript™ and Ajax Development 注:2008年8月Apress出版276页.最新+权威mootools(1.2版本)开发指南.2分绝对超值.
资源推荐
资源详情
资源评论
Aaron Newton
MooTools
Essentials
The Official MooTools Reference for
JavaScript
™
and Ajax Development
BOOKS FOR PROFESSIONALS BY PROFESSIONALS
®
MooTools Essentials:
The Official MooTools Reference for JavaScript
™
and Ajax Development
Dear Reader,
Whether you are visiting or building a web site these days, you can’t deny that
JavaScript has become an important part of the experience. Visitors to web sites
expect them to be interactive and responsive, and that means that those of us who
build them must spend the time to make that experience come alive.
In the past, JavaScript was often a tedious business, with browsers each offer-
ing their own mercurial blend of standard and nonstandard functionality. Modern
JavaScript has taken off with the advent of JavaScript frameworks: libraries that
enhance the JavaScript language itself and help you avoid all the pesky browser bugs.
MooTools is a JavaScript framework that enables you to write clean, concise, reus-
able code to animate and dynamically change the content on your site using Ajax and
other technologies, taking care of all the grunt work for you. This book aims to make
the process of getting started with MooTools an easy one, covering everything from
downloading the code and adding it to your pages to explaining what each class and
method does (and, perhaps more importantly, when you’ll use each one).
I’ve combined real-world examples with nuanced explanations of everything you
need to know to make your site fun and engaging. You’ll be adding effects and Ajax in
no time.
Have fun,
Aaron Newton
Newton
MooTools Essentials
Apress’s firstPress series is your source for understanding cutting-edge technology. Short, highly
focused, and written by experts, Apress’s firstPress books save you time and effort. They contain
the information you could get based on intensive research yourself or if you were to attend a
conference every other week—if only you had the time. They cover the concepts and techniques
that will keep you ahead of the technology curve. Apress’s firstPress books are real books, in your
choice of electronic or print-on-demand format, with no rough edges even when the technology
itself is still rough. You can’t afford to be without them.
User level:
Beginner–Intermediate
www.apress.com
SOURCE CODE ONLINE
276
PAGES
Available as a
PDF Electronic Book
or Print On Demand
About firstPress
Apress's firstPress series is your source for understanding cutting-edge technology. Short,
highly focused, and written by experts, Apress's firstPress books save you time and effort. They
contain the information you could get based on intensive research yourself or if you were to
attend a conference every other week—if only you had the time. They cover the concepts and
techniques that will keep you ahead of the technology curve. Apress's firstPress books are real
books, in your choice of electronic or print-on-demand format, with no rough edges even when
the technology itself is still rough. You can't afford to be without them.
MooTools Essentials: The Official MooTools Reference for
JavaScript™ and Ajax Development
Dear Reader,
Whether you are visiting or building a web site these days, you can’t deny that JavaScript has
become an important part of the experience. Visitors to web sites expect them to be interactive
and responsive, and that means that those of us who build them must spend the time to make
that experience come alive.
In the past, JavaScript was often a tedious business, with browsers each offering their own
mercurial blend of standard and nonstandard functionality. Modern JavaScript has taken off
with the advent of JavaScript frameworks: libraries that enhance the JavaScript language itself
and help you avoid all the pesky browser bugs.
MooTools is a JavaScript framework that enables you to write clean, concise, reusable code to
animate and dynamically change the content on your site using Ajax and other technologies,
taking care of all the grunt work for you. This book aims to make the process of getting started
with MooTools an easy one, covering everything from downloading the code and adding it to
your pages to explaining what each class and method does (and, perhaps more importantly,
when you’ll use each one).
I’ve combined real-world examples with nuanced explanations of everything you need to know
to make your site fun and engaging. You’ll be adding effects and Ajax in no time.
Have fun,
Aaron Newton
MooTools Essentials i
Contents
Preface ..................................................................................... xi
Acknowledgments...................................................................................xi
A Note on the Code Formatting in This Book......................................xi
Introduction ............................................................................ xiii
JavaScript Frameworks ....................................................................... xiv
Why You Should Use a JavaScript Framework ................................. xiv
About MooTools.................................................................................... xv
MooTools vs. Other Frameworks......................................................... xvii
About the Author..................................................................................xix
About This Book.................................................................................... xx
Who This Book Is For................................................................................ xxi
What You Need to Know .......................................................................... xxii
Summary..............................................................................................xxii
Chapter 1: Getting Started with MooTools.....................................1
Downloading MooTools.......................................................................... 1
Downloading MooTools Official Plug-Ins ................................................... 2
Core Builder .................................................................................................. 4
Making Use of MooTools’ Modular Design................................................. 4
Compatibility................................................................................................. 5
Compression Options .................................................................................... 5
ii MooTools Essentials
Adding MooTools to Your Page(s) .........................................................6
Coding for Reuse..................................................................................... 6
Compression ............................................................................................ 7
Using the YUI Compressor ........................................................................... 7
Chapter 2: Reviewing MooTools ...................................................9
MooTools File Structure......................................................................... 9
Manifest of MooTools Scripts ..............................................................10
The MooTools Core .................................................................................... 10
The MooTools Plug-Ins: “More” ................................................................ 17
Chapter 3: Shortcuts and Helpful Functions.................................23
Determining the Type of an Object: $type ........................................... 23
$type :: Core/Core.js.................................................................................... 23
Checking Whether Values Are Defined:
$defined, $chk, and $pick ................................................................. 25
$defined :: Core/Core.js............................................................................... 25
$chk :: Core/Core.js..................................................................................... 26
$pick :: Core/Core.js.................................................................................... 26
Working with Objects: $extend,
$merge, and $unlink ......................................................................... 28
$extend :: Core/Core.js................................................................................ 29
$merge :: Core/Core.js ................................................................................ 31
$unlink :: Core/Core.js ................................................................................ 33
Iterable Helpers and Shortcuts: $arguments,
$each, $splat, $A, and $H ................................................................. 34
$arguments :: Core/Core.js ......................................................................... 34
$each :: Core/Core.js................................................................................... 35
$splat :: Core/Core.js................................................................................... 36
MooTools Essentials iii
$A :: Core/Core.js........................................................................................ 37
$H :: Core/Core.js........................................................................................ 38
Other Shortcuts: $clear, $empty, $lambda,
$random, $time, $try .........................................................................39
$clear :: Core/Core.js .................................................................................. 39
$empty :: Core/Core.js................................................................................. 39
$lambda :: Core/Core.js .............................................................................. 40
$random :: Core/Core.js.............................................................................. 41
$time :: Core/Core.js.................................................................................... 42
$try :: Core/Core.js...................................................................................... 42
Browser: Information About the Client...............................................43
Chapter 4: Native Objects..........................................................45
Native.implement...................................................................................45
Arrays..................................................................................................... 47
Array Methods............................................................................................. 47
Array :: Iteration Methods........................................................................... 48
Array.each ................................................................................................... 48
Anonymous Methods vs. Named Functions ............................................... 50
Other Iteration Methods .............................................................................. 50
Array :: Introspection Methods ................................................................... 51
Array :: Manipulation Methods................................................................... 51
Objects (a.k.a. Hash).............................................................................53
Hash............................................................................................................. 54
$H ................................................................................................................ 55
Hash Methods.............................................................................................. 55
Hash :: Iteration Methods............................................................................ 56
Hash.each .................................................................................................... 56
Other Iteration Methods .............................................................................. 58
Hash :: Introspection Methods .................................................................... 59
Hash :: Manipulation Methods.................................................................... 61
剩余274页未读,继续阅读
资源评论
- yoyo19722013-03-01学习一下mootools控件设计,很有启发
- hyper2k2012-06-10很不错,但mootools本身的例子太少了,界面复杂了会有点慢,最终还是改用了jquery
soft1999
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功