亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

?? ??? ??
jQuery 1.4.4 速查表 核心 jQuery核心函數(shù) jQuery(expression jQuery(html jQuery(html jQuery(elements) jQuery() jQuery(callback) jQuery對象訪問 each(callback) size() length context get() get(index) index([subject]) selector 數(shù)據(jù)緩存 data([name]) data(name data(obj) removeData(name) jQuery.data(element jQuery.data([element] 隊(duì)列機(jī)制 queue(name) queue(name queue(name dequeue(name) clearQueue([queueName]) 插件機(jī)制 jQuery.extend(object) jQuery.fn.extend(object) 多庫共存 jQuery.noConflict() jQuery.noConflict(extreme) 選擇器 基本 #id element .class * selector1 層級(jí) ancestor descendant parent > child prev + next prev ~ siblings 基本(過濾器) :first :last :not :even :odd :eq :gt :lt :header :animated 內(nèi)容(過濾器) :contains :empty :has :parent 可見性(過濾器) :hidden :visible 屬性 [attribute] [attribute=value] [attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] [selector1][selector2][selectorN] 子元素 :first-child :last-child :nth-child :only-child 表單 :input :text :password :radio :checkbox :reset :submit :image :button :file :hidden 表單對象屬性 :checked :disabled :enabled :selected 屬性 屬性 attr(name) attr(properties) attr(key attr(key removeAttr(name) CSS類 addClass(class) addClass(function(index removeClass([class]) removeClass(function(index toggleClass(class) toggleClass(class toggleClass(function(index HTML代碼 html() html(val) html(function(index 文本 text() text(val) text(function(index val() val(val) val(array) val(function(index 篩選 過濾 eq(index) first() last() hasClass(class) filter(expr) filter(fn) is(expr) map(callback) has(expr) not(expr) slice(start 查找 children([expr]) closest(expr find(expr) next([expr]) nextAll([expr]) nextUntil([expr]) offsetParent() parent([expr]) parents([expr]) parentsUntil([expr]) prev([expr]) prevAll([expr]) prevUntil([expr]) siblings([expr]) 串聯(lián) add(expr andSelf() contents() end() 文檔處理 內(nèi)部插入 append(content) append(function(index appendTo(content) prepend(content) prepend(function(index prependTo(content) 外部插入 after(content) after(function) before(content) before(function) insertAfter(content) insertBefore(content) 包裹 wrap(html) wrap(elem) wrap(fn) unwrap() wrapAll(html) wrapAll(elem) wrapInner(html) wrapInner(elem) wrapInner(fn) 替換 replaceWith(content) replaceAll(selector) 刪除 empty() remove([expr]) detach([expr]) 復(fù)制 clone() clone(true) CSS CSS css(name) css(properties) css(name css(name 位置 offset() offset(coordinates) position() scrollLeft() scrollLeft(val) scrollTop() scrollTop(val) 尺寸 height() height(val) width() width(val) innerHeight() innerWidth() outerHeight(options) outerWidth(options) 事件 頁面載入 ready(fn) 事件處理 bind(type one(type trigger(type triggerHandler(type unbind([type] 事件委派 live(type die([type] delegate(selector undelegate() 事件切換 hover(over toggle(fn 事件 blur() blur(fn) change() change(fn) click() click(fn) dblclick() dblclick(fn) error() error(fn) focus() focus(fn) focusin(fn) focusout(fn) keydown() keydown(fn) keypress() keypress(fn) keyup() keyup(fn) load(fn) mousedown(fn) mousemove(fn) mouseout(fn) mouseover(fn) mouseup(fn) resize(fn) scroll(fn) select() select(fn) submit() submit(fn) unload(fn) 效果 基本 show() show(speed hide() hide(speed toggle() toggle(switch) toggle(speed 滑動(dòng) slideDown(speed slideUp(speed slideToggle(speed 淡入淡出 fadeIn(speed fadeOut(speed fadeTo(speed fadeToggle(speed 自定義 animate(params animate(params stop([clearQueue] delay(duration 設(shè)置 jQuery.fx.off jQuery.fx.interval AJAX AJAX請求 jQuery.ajax([options]) load(url jQuery.get(url jQuery.getJSON(url jQuery.getScript(url jQuery.post(url AJAX事件 ajaxComplete(callback) ajaxError(callback) ajaxSend(callback) ajaxStart(callback) ajaxStop(callback) ajaxSuccess(callback) 其它 jQuery.ajaxSetup([options]) serialize() serializeArray() 工具 瀏覽器及特性檢測 jQuery.support jQuery.browser jQuery.browser.version jQuery.boxModel 數(shù)組和對象操作 jQuery.each(object jQuery.extend([deep] jQuery.grep(array jQuery.inArray(value jQuery.makeArray(obj) jQuery.toArray() jQuery.map(array jQuery.merge(first jQuery.unique(array) jQuery.parseJSON(json) 函數(shù)操作 jQuery.noop jQuery.proxy(function 測試操作 jQuery.contains(container jQuery.isArray(obj) jQuery.isFunction(obj) jQuery.isEmptyObject(obj) jQuery.isPlainObject(obj) jQuery.isWindow(obj) jQuery.type(obj) 字符串操作 jQuery.trim(str) URL解析 jQuery.param(obj 插件編寫 jQuery.error(message) 關(guān)于 關(guān)于jQuery API 1.4.4中文版 關(guān)于jQuery 1.4.1中文版 關(guān)于jQuery 1.3 版翻譯 關(guān)于jQuery 1.2 版翻譯 提交bug及獲取更新
??

返回值:jQueryeach(callback)

概述

以每一個(gè)匹配的元素作為上下文來執(zhí)行一個(gè)函數(shù)。

意味著,每次執(zhí)行傳遞進(jìn)來的函數(shù)時(shí),函數(shù)中的this關(guān)鍵字都指向一個(gè)不同的DOM元素(每次都是一個(gè)不同的匹配元素)。而且,在每次執(zhí)行函數(shù)時(shí),都會(huì)給函數(shù)傳遞一個(gè)表示作為執(zhí)行環(huán)境的元素在匹配的元素集合中所處位置的數(shù)字值作為參數(shù)(從零開始的整型)。 返回 'false' 將停止循環(huán) (就像在普通的循環(huán)中使用 'break')。返回 'true' 跳至下一個(gè)循環(huán)(就像在普通的循環(huán)中使用'continue')。

參數(shù)

callbackFunction

對于每個(gè)匹配的元素所要執(zhí)行的函數(shù)

示例

描述:

迭代兩個(gè)圖像,并設(shè)置它們的 src 屬性。注意:此處 this 指代的是 DOM 對象而非 jQuery 對象。

HTML 代碼:
<img/><img/>
jQuery 代碼:
$("img").each(function(i){
   this.src = "test" + i + ".jpg";
 });
結(jié)果:
[ <img src="test0.jpg" />, <img src="test1.jpg" /> ]

描述:

如果你想得到 jQuery對象,可以使用 $(this) 函數(shù)。

HTML 代碼:
<button>Change colors</button>
<span></span> 
<div></div> 
<div></div>

<div></div> 
<div></div>
<div id="stop">Stop here</div> 
<div></div>

<div></div>
<div></div>
jQuery 代碼:
$("img").each(function(){
  $(this).toggleClass("example");
});

描述:

你可以使用 'return' 來提前跳出 each() 循環(huán)。

HTML 代碼:
<button>Change colors</button>
<span></span> 
<div></div> 
<div></div>

<div></div> 
<div></div>
<div id="stop">Stop here</div> 
<div></div>

<div></div>
<div></div>
jQuery 代碼:
$("button").click(function () { 
$("div").each(function (index, domEle) { 
  // domEle == this 
  $(domEle).css("backgroundColor", "yellow");  
  if ($(this).is("#stop")) { 
  $("span").text("Stopped at div index #" + index); 
  return false; 
  } 
});
});
?? ??: ?? ??: