开发工具:
文件大小: 974kb
下载次数: 0
上传时间: 2011-05-04
详细说明: 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) :fir st-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文档 ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.