⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tabbedpane.js

📁 It is a java server faces tab component.
💻 JS
字号:
function PJSF_SelectOne(selfName,itemID,arrowDnID,itemsID,
	onStyleClass,offStyleClass,dnStyleClass) {
	// Field
	this.selfName = selfName;
	this.itemID = itemID;
	this.arrowDnID = arrowDnID;
	this.itemsID = itemsID;
	this.onStyleClass = onStyleClass;
	this.offStyleClass = offStyleClass;
	this.dnStyleClass = dnStyleClass;
	//
	this.arrowDnStyleClass = null;
	this.hideTimerID = null;
	// method
	this.mouseOver = pjsf_selectOne_mouseOver;
	this.mouseOut = pjsf_selectOne_mouseOut;
	this.arrowDnClick = pjsf_selectOne_arrowDnClick;
	this.itemsMouseOver = pjsf_selectOne_itemsMouseOver;
	this.itemsMouseOut = pjsf_selectOne_itemsMouseOut;
	//
	this.finalize = pjsf_selectOne_finalize;
}

function pjsf_selectOne_finalize() {
	var item = document.getElementById( this.itemID );
	var arrowDn = document.getElementById( this.arrowDnID );
	var items = document.getElementById( this.itemsID );
	item.className = this.offStyleClass;
	arrowDn.className = this.offStyleClass;
	this.arrowDnStyleClass = null;
	items.style.display = 'none';
}

function pjsf_selectOne_mouseOver() {
	var item = document.getElementById( this.itemID );
	var arrowDn = document.getElementById( this.arrowDnID );
	item.className = this.onStyleClass;
	if ( this.arrowDnStyleClass == null ) {
		this.arrowDnStyleClass = this.onStyleClass;
	}
	arrowDn.className = this.arrowDnStyleClass;
	//
	if ( this.hideTimerID != null ) {
		clearTimeout( this.hideTimerID );
	}
}

function pjsf_selectOne_mouseOut() {
	this.hideTimerID = setTimeout(this.selfName + ".finalize();",200);
}

function pjsf_selectOne_arrowDnClick() {
	var arrowDn = document.getElementById( this.arrowDnID );
	var items = document.getElementById( this.itemsID );
	this.arrowDnStyleClass = this.dnStyleClass;
	arrowDn.className = this.dnStyleClass;
	items.style.display = 'block';
}

function pjsf_selectOne_itemsMouseOver() {
	var items = document.getElementById( this.itemsID );
	items.style.display='block';
	//
	if ( this.hideTimerID != null ) {
		clearTimeout( this.hideTimerID );
	}
}

function pjsf_selectOne_itemsMouseOut() {
	this.hideTimerID = setTimeout(this.selfName + ".finalize();",200);
}
function PJSF_SelectOne(selfName,itemID,arrowDnID,itemsID,
	onStyleClass,offStyleClass,dnStyleClass) {
	// Field
	this.selfName = selfName;
	this.itemID = itemID;
	this.arrowDnID = arrowDnID;
	this.itemsID = itemsID;
	this.onStyleClass = onStyleClass;
	this.offStyleClass = offStyleClass;
	this.dnStyleClass = dnStyleClass;
	//
	this.arrowDnStyleClass = null;
	this.hideTimerID = null;
	// method
	this.mouseOver = pjsf_selectOne_mouseOver;
	this.mouseOut = pjsf_selectOne_mouseOut;
	this.arrowDnClick = pjsf_selectOne_arrowDnClick;
	this.itemsMouseOver = pjsf_selectOne_itemsMouseOver;
	this.itemsMouseOut = pjsf_selectOne_itemsMouseOut;
	//
	this.finalize = pjsf_selectOne_finalize;
}

function pjsf_selectOne_finalize() {
	var item = document.getElementById( this.itemID );
	var arrowDn = document.getElementById( this.arrowDnID );
	var items = document.getElementById( this.itemsID );
	item.className = this.offStyleClass;
	arrowDn.className = this.offStyleClass;
	this.arrowDnStyleClass = null;
	items.style.display = 'none';
}

function pjsf_selectOne_mouseOver() {
	var item = document.getElementById( this.itemID );
	var arrowDn = document.getElementById( this.arrowDnID );
	item.className = this.onStyleClass;
	if ( this.arrowDnStyleClass == null ) {
		this.arrowDnStyleClass = this.onStyleClass;
	}
	arrowDn.className = this.arrowDnStyleClass;
	//
	if ( this.hideTimerID != null ) {
		clearTimeout( this.hideTimerID );
	}
}

function pjsf_selectOne_mouseOut() {
	this.hideTimerID = setTimeout(this.selfName + ".finalize();",200);
}

function pjsf_selectOne_arrowDnClick() {
	var arrowDn = document.getElementById( this.arrowDnID );
	var items = document.getElementById( this.itemsID );
	this.arrowDnStyleClass = this.dnStyleClass;
	arrowDn.className = this.dnStyleClass;
	items.style.display = 'block';
}

function pjsf_selectOne_itemsMouseOver() {
	var items = document.getElementById( this.itemsID );
	items.style.display='block';
	//
	if ( this.hideTimerID != null ) {
		clearTimeout( this.hideTimerID );
	}
}

function pjsf_selectOne_itemsMouseOut() {
	this.hideTimerID = setTimeout(this.selfName + ".finalize();",200);
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -