jQuery 1.5 API 中文版
jQuery Version 1.5 API 中文版 IE用户无法在线查看本文档,请下载jQuery API Version1.5 中文版AIR客户端查看,或者使用chrome,safari,firefox,opera等浏览器查看!!! jQuery 1.5 API Cheat Sheet来源 Selectors Basics #id element .class, .class.class * selector1, selector2 Hierarchy ancestor descendant parent > child prev + next prev ~ siblings Basic Filters :first :last :not(selector) :even :odd :eq(index) :gt(index) :lt(index) :header :animated Content Filters :contains(text) :empty :has(selector) :parent Visibility Filters :hidden :visible Child Filters :nth-child(expr) :first-child :last-child :only-child Attribute Filters [attribute] [attribute=value] [attribute!=value] [attribute^=value] [attribute$=value] [attribute*=value] [attribute|=value] [attribute~=value] [attribute][attribute2] Forms :input :text :password :radio :checkbox :submit :image :reset :button :file Form Filters :enabled :disabled :checked :selected Core jQuery function $.jQuery( selector [, context] ), .jQuery( element ), .jQuery( elementArray ), .jQuery( jQueryObject ), .jQuery( ) $.jQuery( html [, ownerDocument] ), .jQuery( html, props ) $.jQuery( fn ) jQuery Object Accessors $.each( fn(index, element) ) num.size( ) , .length str.selector el.context $.eq( index ) jQuery.error( str ) [el],el.get( [index] ) num.index( ).index( selector ).index( element ) $jQuery.pushStack( elements, [name, arguments] ) arr.toArray( ) Interoperability $jQuery.noConflict( [extreme] ) ver. 04-02-2011 Attributes Attributes str.attr( name ) $.attr( name, val ), .attr( map ), .attr( name, fn(index, attr) ) $.removeAttr( name ) Class $.addClass( class ), .addClass( fn(index, class) ) bool.hasClass( class ) $.removeClass( [class] ), .removeClass( fn(index, class) ) $.toggleClass( class [, switch] ), .toggleClass( fn(index, class) [, switch] ) HTML, text str.html( ) $.html( val ), .html( fn(index, html) ) str.text( ) $.text( val ), .text( fn(index, html) ) Value str,arr.val( ) $.val( val ), .val( fn() ) CSS CSS str.css( name ) $.css( name, val ), .css( map ), .css( name, fn(index, val) ) Positioning obj.offset( ) $.offset( coord ), .offset( fn( index, coord ) ) $.offsetParent( ) obj.position( ) int.scrollTop( ) $.scrollTop( val ) int.scrollLeft( ) $.scrollLeft( val ) Height and Width int.height( ) $.height( val ), .height( fn(index, height ) ) int.width( ) $.width( val ), .width(( fn(index, height ) ) int.innerHeight( ) int.innerWidth( ) int.outerHeight( [margin] ) int.outerWidth( [margin] ) Deferred deferred object = { defdone(doneCallbacks) deffail(failCallbacks) boolisRejected() boolisResolved() defreject([args]) defrejectWith(context, [args]) defresolve([args]) defresolveWith(context, [args]) defthen(doneCallbacks, failCallbacks) }1.5+ def.when(deferreds)1.5+ Traversing Filtering $.eq( index ) $.first( ) $.last( ) $.has( selector ), .has( element ) $.filter( selector ), .filter( fn(index) ) bool.is( selector ) $.map( fn(index, element) ) $.not( selector ), .not( elements ), .not( fn( index ) ) $.slice( start [, end] ) Tree traversal $.children( [selector] ) $.closest( selector [, context] ) arr.closest( selectors [, context] ) $.find( selector ) $.next( [selector] ) $.nextAll( [selector] ) $.nextUntil( [selector] ) $.offsetParent( ) $.parent( [selector] ) $.parents( [selector] ) $.parentsUntil( [selector] ) $.prev( [selector] ) $.prevAll( [selector] ) $.prevUntil( [selector] ) $.siblings( [selector] ) Miscellaneous $.add( selector [, context] ), .add( elements ), .add( html ) $.andSelf( ) $.contents( ) $.end( ) Manipulation Inserting Inside $.append( content ), .append( fn( index, html ) ) $.appendTo( target ) $.prepend( content ), .prepend( fn( index, html ) ) $.prependTo( target ) Inserting Outside $.after( content ), .after( fn() ) $.before( content ), .before( fn() ) $.insertAfter( target ) $.insertBefore( target ) Inserting Around $.unwrap( ) $.wrap( wrappingElement ), .wrap( fn ) $.wrapAll(wrappingElement ), .wrapAll( fn ) $.wrapInner( wrappingElement ), .wrapInner( fn ) Replacing $.replaceWith( content ), .replaceWith( fn ) $.replaceAll( selector ) Removing $.detach( [selector] ) $.empty( ) $.remove( [selector] ) Copying $.clone( [withDataAndEvents], [deepWithDataAndEvents] )1.5∗ Events Page Load $.ready( fn() ) Event Handling $.bind( type [, data ], fn(eventObj) ) $.bind( type [, data], false ) $.bind( array ) $.unbind( [type] [, fn]) $.one( type [, data ], fn(eventObj) ) $.trigger( event [, data]) obj.triggerHandler( event [, data]) $.delegate( selector, type, [data], handler) $.undelegate( [selector, type, [handler]]) Live Events $.live( eventType [, data], fn() ) $.die( ), .die( [eventType] [, fn() ]) Interaction Helpers $.hover( fnIn(eventObj), fnOut(eventObj)) $.toggle( fn(eventObj), fn2(eventObj) [, ...]) Event Helpers function ( [data,] [fn] ) $.blur,.mousedown,.change,.mouseenter,.click,.mouseleave,.dblclick,.mousemove,.error,.mouseout,.focus,.mouseover,.focusin,.mouseup,.focusout,.resize,.keydown,.scroll,.keypress,.select,.keyup,.submit,.load( [data,] fn ),.unload( [data,] fn ) Event object event = { elcurrentTarget, *data, boolisDefaultPrevented(), boolisImmediatePropagationStopped(), boolisPropagationStopped(), strnamespace, numpageX, numpageY, preventDefault(), elrelatedTarget, objresult, stopImmediatePropagation(), stopPropagation(), eltarget, numtimeStamp, strtype, strwhich } Effects Basics $.show( [ duration [, easing] [, fn] ] ) $.hide( [ duration [, easing] [, fn] ] ) $.toggle( [showOrHide] ) $.toggle( duration [, easing] [, fn] ) Sliding $.slideDown( duration [, easing] [, fn] ) $.slideUp( duration [, easing] [, fn] ) $.slideToggle( [duration] [, easing] [, fn] ) Fading $.fadeIn( duration [, easing] [, fn] ) $.fadeOut( duration [, easing] [, fn] ) $.fadeTo( [duration,] opacity [, easing] [, fn] ) $.fadeToggle( [duration,] [, easing] [, fn] ) Custom $.animate( params [, duration] [, easing] [, fn] ) $.animate( params, options ) $.stop( [clearQueue] [, jumpToEnd] ) $.delay( duration [, queueName] ) Settings booljQuery.fx.off numjQuery.fx.interval AJAX Low-Level Interface jqXHRjQuery.ajax( options, [settings] )1.5+ mapaccepts boolasync = true fnbeforeSend( jqXHR, config) boolcache = true fncomplete( jqXHR, status) mapcontents strcontentType objcontext mapconverters boolcrossDomain obj, strdata fndataFilter( data, type ) boolglobal = true mapheaders boolifModified = false strjsonp fnjsonpCallback strpassword boolprocessData = true strscriptCharset mapstatusCode numtimeout booltraditional strtype = 'GET' strurl = curr. page strusername fnxhr strdataType ∈ {xml, json, script, html} fnerror( jqXHR, status, errorThrown ) fnsuccess( data, status, jqXHR ) jQuery.ajaxSetup( options ) Shorthand Methods $.load( url [, data] [, fn( responseText, status, XHR )] ) jqXHRjQuery.get( url [, data] [, fn( data, status, XHR )] [, type] ) jqXHRjQuery.getJSON( url [, data] [, fn( data, status )] ) jqXHRjQuery.getScript( url [, fn( data, status )] ) jqXHRjQuery.post( url [, data] [, fn( data, status )] [, type] ) Global Ajax Event Handlers $.ajaxComplete( fn( event, XHR, options ) ) $.ajaxError( fn( event, XHR, options, thrownError ) ) $.ajaxSend( fn( event, XHR, options ) ) $.ajaxStart( fn( ) ) $.ajaxStop( fn( ) ) $.ajaxSuccess( fn(event, XHR, options) ) Miscellaneous str.serialize( ) [obj].serializeArray( ) strjQuery.param( obj, [traditional] ) Utilities Browser and Feature Detection objjQuery.support objjQuery.browserdeprecated strjQuery.browser.versiondeprecated booljQuery.boxModeldeprecated Basic operations objjQuery.each( obj, fn( index, valueOfElement ) ) objjQuery.extend( [deep,] target, obj1 [, objN] ) arrjQuery.grep( array, fn( element, index ) [, invert] ) arrjQuery.makeArray( obj ) arrjQuery.map( array, fn( element, index ) ) numjQuery.inArray( val, array ) arrjQuery.merge( first, second ) fnjQuery.noop fnjQuery.proxy( fn, scope ), jQuery.proxy( scope, name ) fnjQuery.sub( )1.5+ arrjQuery.unique( array ) strjQuery.trim( str ) objjQuery.parseJSON( str ) Data functions $.clearQueue( [name] ) $.dequeue( [name] ), jQuery.dequeue( [name] ) objjQuery.data( element, key ), jQuery.data( ) obj.data( ), .data( key ) $.data( key, val ), .data( obj ) $.removeData( [name] ) [fn].queue( [name] ) jQuery.queue( [name] ) $.queue( [name,] fn( next ) ), jQuery.queue( [name,] fn( ) ) $.queue( [name,] queue ), jQuery.queue( [name,] queue ) Test operations strjQuery.type( obj ) booljQuery.isArray( obj ) booljQuery.isEmptyObject( obj ) booljQuery.isFunction( obj ) booljQuery.isPlainObject( obj ) booljQuery.isWindow( obj ) 获取jQuery 1.5 API文档
- 1
- 2
- 3
- 粉丝: 1
- 资源: 43
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- x64dbg-development-2022-09-07-14-52.zip
- 多彩吉安红色旅游网站-JAVA-基于springBoot多彩吉安红色旅游网站的设计与实现
- 本 repo 包含使用新 cv2 接口的 OpenCV-Python 库教程.zip
- 更新框架 (TUF) 的 Python 参考实现.zip
- Qos,GCC,pacing,Nack
- 章节1:Python入门视频
- 无需样板的 Python 类.zip
- ESP32 : 32-bit MCU & 2.4 GHz Wi-Fi & BT/BLE SoCs
- 博物馆文博资源库-JAVA-基于springBoot博物馆文博资源库系统设计与实现
- 旅游网站-JAVA-springboot+vue的桂林旅游网站系统设计与实现
- 1
- 2
- 3
- 4
前往页