15分钟搞定jQuery

内容:
  1. jQuery特点
  2. CSS选择器用法
  3. jQuery集合
  4. jQuery集合操作
  5. 获取匹配元素的值
  6. DOM元素遍历
  7. 事件处理
  8. 安静加载运行
  9. 对象链串访问
  10. 疯狂链串(Crazy Chaining)
  11. Ajax用法
  12. 推荐了几个插件

------------------------------------------------------------------------------------------------------

What makes jQuery interesting?

• Built around CSS selectors

• Well behaved

• Doesn’t hijack your global namespace

• Plays well with other libraries

• API designed with conciseness and convenience as the driving factors

-------------------------------------------------------------------------------------------------------

The jQuery() function

jQuery('div#intro h2')

jQuery('div.section > p')

jQuery('input:radio')

$('div#intro h2')

--------------------------------------------------------------------------------------------------------

jQuery collections

• $('div.section') returns a jQuery collection

• You can call methods on it:

$('div.section').size() = no. of matched elements

$('div.section').each(function(div) {

// Manipulate the div

}

---------------------------------------------------------------------------------------------------------