Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- toggleTabs:
- function(e) {
- var elEvent = e || window.event;
- var elTarget = null;
- if (elEvent) {
- elTarget = elEvent.target;
- if (elTarget == null)
- elTarget = elEvent.srcElement;
- // Ignore event if shopper clicks on active tab.
- if (elTarget && elTarget.className != "tab_on") {
- var id = elTarget.id;
- if (id.indexOf(ProStores.Detail.ID_DIV_TAB) != -1) {
- var nIdx = id.substring(ProStores.Detail.ID_DIV_TAB.length);
- for (var i = 0; i < ProStores.Detail.nTabCount; i++) {
- var j = i + 1;
- var strClassName = "tab_off";
- var elDesc = _(ProStores.Detail.ID_DIV_DESC + j);
- if (elDesc) {
- if (j == nIdx)
- elDesc.style.display = "inline";
- else
- elDesc.style.display = "none";
- }
- var elTab = _(ProStores.Detail.ID_DIV_TAB + j);
- if (elTab) {
- if (j == nIdx)
- elTab.className = "tab_on";
- else
- elTab.className = "tab_off";
- }
- }
- }
- }
- }
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement