weikeweixin/web/wechat/website/Estate/js/maivl.js

(开头部分) 1KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

/*navigator*/
var iNav = (function(){
	var types = {radio:1, checkbox:2, oneToggle:3}
	var nav = function(){
		this.type = types.radio;
		this.eIndex = 0;
		this.len = 0;
		this.eOn = false;
		this.reClick = false;
	}
	nav.prototype = {
		stype: function(typ){
			this.type = types[typ] || this.type;
			return this;
		},
		swth: function(el, els, fn){
			var that = this;
			that.el = el;
			that.els = els;
			switch(that.type){
				case types.radio:
					for(var i=0,ci; ci=els[i];i++){
						if(ci == el){
							that.eIndex = i;
							that.reClick = ci.classList.add("on");
						}else{
							ci.classList.remove("on");
						}
					}
					that.len = i;
				break;
				case types.checkbox:
					that.eOn = el.classList.toggle("on");
				break;
				case types.oneToggle:
					for(var i=0,ci; ci=els[i]; i++){
						if(ci == el){
							that.eIndex = i;
							that.eOn = ci.classList.toggle("on");
						}else{
							ci.classList.remove("on");
						}
					}
					that.len = i;
				break;
				default:
				break;
			}
			that.type = types.radio;
			if(typeof fn === "function"){fn.apply(that);}
			return that;
		}
	}
	return new nav();
})();


/*第三方插件:html模板生成器*/
var iTemplate = (function(){
	var template = function(){};
后面还有 18 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。