第1章 引荐 jQuery
本章概要
为什么您应该使用 jQuery
并不唐突的 JavaScript 意味着什么
jQuery 的基本元素和概念
结合其他 JavaScript 库使用 jQuery
Considered a “toy” language by serious web developers for most of its lifetime, JavaScript has regained its prestige in the past few years as a result of the renewed interest in Rich Internet Applications and Ajax technologies. The language has been forced to grow up quickly as client-side developers have tossed aside cut-and-paste JavaScript for the convenience of full-featured JavaScript libraries that solve difficult cross-browser problems once and for all and provide new and improved paradigms for web development.
在它的大部分的生涯里,JavaScript 被严谨的 web 开发者当作“玩具”语言,然而在过去数年间,随着人们对富英特网应用(Rich Internet Application)和 Ajax 技术的重新关注,JavaScript 重获威望。这门语言被迫快速成长,因为客户端开发者已经放弃剪切和粘贴 JavaScript,转而采用方便快捷、功能完备的 JavaScript 库。该库断然地解决跨浏览器问题,而且提供新颖、改善了的 web 开发范式。
A relative latecomer to this world of JavaScript libraries, jQuery has taken the web development community by storm, quickly winning the support of major websites such as MSNBC, and well-regarded open source projects including SourceForge, Trac, and Drupal.
作为 JavaScript 库世界的相对的后来者,jQuery 如暴风雪一般横扫 web 开发社区,很快赢得诸如主要网站 MSNBC,和颇受关注的开源项目包括 SourceForge, Trac 以及 Drupal 的支持。
Compared with other toolkits that focus heavily on clever JavaScript techniques, jQuery aims to change the way that web developers think about creating rich functionality in their pages. Rather than spending time juggling the complexities of advanced JavaScript, designers can leverage their existing knowledge of Cascading Style Sheets (CSS), Extensible Hypertext Markup Language (XHTML), and good old straightforward JavaScript to manipulate page elements directly, making more rapid development a reality.
和其它聚焦于 JavaScript 灵活技巧的工具包相比,jQuery 旨在改变 web 开发者在创建功能丰富的页面时的思维方式。与其花时··间杂耍 JavaScript 高级复杂的技巧,不如让开发者能借用关于层叠样式表(Cascading Style Sheets,CSS),可扩展超文本标记语言(Extensible Hypertext Markup Language,XHTML),和老好浅易的 JavaScript 的现有知识,去直接操纵页面元素,让更进一步的快速开发成为现实。
In this book, we’re going to take an in-depth look at what jQuery has to offer us as page authors of Rich Internet Applications. Let’s start by finding out what exactly jQuery brings to the page-development party.
在本书中,我们将要深入考察 jQuery 给富英特网应用的页面设计者提供了什么。那就开始寻找 jQuery 确实给页面开发的盛宴带来了什么吧。