jQuery 1.5 API 中文版

时间:2014-05-24 04:17:58
【文件属性】:

文件名称:jQuery 1.5 API 中文版

文件大小:974KB

文件格式:ZIP

更新时间:2014-05-24 04:17:58

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文档


网友评论

  • 是在浏览器中才能打开, 不是太方便 , 而且 打开后 , 排版有点错乱 。 :(
  • 用着还行,当做文档参考
  • 感觉打开api有点慢,用的是chrome不知道Firefox怎么样
  • 不好用,为什么我打不开,老是弹出下载的对话框!
  • 整体来说不错,作为学习帮助文档很有用
  • 内容很详细
  • 不好用,为什么我打不开,老是弹出下载的对话框!
  • 很详细,值得学习
  • 没有chm的用起来方便。
  • 连不上网啊
  • 没有chm的查起来方便
  • 内容很详细,不用每次上网查了,可以本地使用了
  • 条目分类可以更清晰一些 1.3的看惯了
  • 资源不错 不过用的IE貌似不好用
  • 可惜不是chm
  • 是啊,不像以前背景为黑色了,而且好像也不是连网的!
  • 内容很详细,不过跟以前版本的页面样式不一样,如果一样就更好了,谢谢!