-
jQuery源码分析-jQuery中的循环技巧
- 作者:nuysoft/JS攻城师/高云 QQ:47214707 EMail:nuysoft@gmail.com
- 声明:本文为原创文章,如需转载,请注明来源并保留原文链接。
- 前记:本文收集了jQuery中出现的各种遍历技巧和场景
- for ( type in events ) {
-
- }
- for ( var j = 0, l = handlers.length; j < l; j++ ) {
-
- }
- var elem;
- for ( var i = 0; elems[i]; i++ ) {
- elem = elems[i];
-
- }
- for ( j = 0; j < eventType.length; j++ ) {
- eventType.splice( j--, 1 );
- }
- for ( var i = 1; i < results.length; i++ ) {
- if ( results[i] === results[ i - 1 ] ) {
- results.splice( i--, 1 );
- }
- }
- for ( j = pos || 0; j < eventType.length; j++ ) {
-
- }
- for ( var i = this.props.length, prop; i; ) {
- prop = this.props[ --i ];
- event[ prop ] = originalEvent[ prop ];
- }
- for ( j = tbody.length - 1; j >= 0 ; --j ) {
- if ( jQuery.nodeName( tbody[ j ], "tbody" ) && !tbody[ j ].childNodes.length ) {
- tbody[ j ].parentNode.removeChild( tbody[ j ] );
- }
- }
- for ( i = 0; checkSet[i] != null; i++ ) {
- if ( checkSet[i] && (checkSet[i] === true || checkSet[i].nodeType === 1 && Sizzle.contains(context, checkSet[i])) ) {
- results.push( set[i] );
- }
- }
- for ( ; array[i]; i++ ) {
- ret.push( array[i] );
- }
- for ( var i = 0; (item = curLoop[i]) != null; i++ ) {
-
- }
- for ( node = parent.firstChild; node; node = node.nextSibling ) {
- if ( node.nodeType === 1 ) {
- node.nodeIndex = ++count;
- }
- }
- for ( ; cur; cur = cur[dir] ) {
- if ( cur.nodeType === 1 && ++num === result ) {
- break;
- }
- }
- var i = promiseMethods.length;
- while( i-- ) {
- obj[ promiseMethods[i] ] = deferred[ promiseMethods[i] ];
- }
- while( (type = types[ i++ ]) ) {
-
- }
- while( dataTypes[ 0 ] === "*" ) {
- dataTypes.shift();
- if ( ct === undefined ) {
- ct = s.mimeType || jqXHR.getResponseHeader( "content-type" );
- }
- }
- while( callbacks[ 0 ] ) {
- callbacks.shift().apply( context, args );
- }
- while( ( match = rheaders.exec( responseHeadersString ) ) ) {
- responseHeaders[ match[1].toLowerCase() ] = match[ 2 ];
- }
-
相关阅读:
laravel 安装及入门
mysql事务处理的意义
PHP项目:如何用PHP高并发检索数据库?
inner join、left join、right join等的区别
百度地图引入网页中
google地图引入网页
thinkphp的mvc理解
SpringBoot+Shiro入门小栗子
Springboot+WebSocket+Kafka(写着玩的)
Windows下安装单机Kafka
-
原文地址:https://www.cnblogs.com/xiaochao12345/p/3822300.html
Copyright © 2020-2023
润新知