? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/domains/happytokorea.com/private_html/happyezystyle/
File Upload :
Current File : /home/admin/domains/happytokorea.com/private_html/happyezystyle/zebraStripe.js

/***********************************************************************
# Project:   zebraStripe CSS tables
# Language:  JavaScript/CSS/HTML
# Author:    Copyright: Denny Schlesinger
# Date:      January 7, 2012
# Warrantee: NONE whatsoever but enjoy it all the same
# Notice:    If you use this code, please include this copyright notice
/**********************************************************************/

function zebraStripe(table) {

    // set variables
    var list, light, dark, even, count, elem, clas;
    light = 'row backgroundLight';
    dark  = 'row backgroundDark';
    even = true;
    
    // get table's div nodes
    list = document.getElementById(table).getElementsByTagName('div');
    
    // loop through css table
    count = list.length;
    for(i = 0; i < count; i++) {
    
        // get ith element from the node list
        elem = list[i];
        
        // get the element's class attribute (can't use 'class' a reserved word)
        clas = elem.getAttribute('class');
        
        // if element's class is row, process, else ignore
        if(clas.slice(0,3) == 'row') {
        
            // if even, light, else, dark
            elem.setAttribute("class", even ? light : dark);
            
            // toggle even/odd (true/false)
            even = ! even;
        }
    }
}

T1KUS90T
  root-grov@210.1.60.28:~$