public/javascripts/yui/datatable/datatable.js
function(theadCell) {
    var elTh;

    // Validate Column instance
    if(theadCell instanceof YAHOO.widget.Column) {
        var oColumn = theadCell;
        elTh = oColumn.getThEl();
        if(elTh) {
            return elTh;
        }
    }
    // Validate HTML element
    else {
        var el = Dom.get(theadCell);

        if(el && (el.ownerDocument == document)) {
            // Validate TH element
            if(el.nodeName.toLowerCase() != "th") {
                // Traverse up the DOM to find the corresponding TR element
                elTh = Dom.getAncestorByTagName(el,"th");
            }
            else {
                elTh = el;
            }

            return elTh;
        }
    }

    return null;
}
function(theadCell) {
    var elTh;

    // Validate Column instance
    if(theadCell instanceof YAHOO.widget.Column) {
        var oColumn = theadCell;
        elTh = oColumn.getThEl();
        if(elTh) {
            return elTh;
        }
    }
    // Validate HTML element
    else {
        var el = Dom.get(theadCell);

        if(el && (el.ownerDocument == document)) {
            // Validate TH element
            if(el.nodeName.toLowerCase() != "th") {
                // Traverse up the DOM to find the corresponding TR element
                elTh = Dom.getAncestorByTagName(el,"th");
            }
            else {
                elTh = el;
            }

            return elTh;
        }
    }

    return null;
}
function ( theadCell ) { var elTh ; // Validate Column instance if ( theadCell instanceof YAHOO . widget . Column ) { var oColumn = theadCell ; elTh = oColumn . getThEl ( ) ; if ( elTh ) { return elTh ; } } // Validate HTML element else { var el = Dom . get ( theadCell ) ; if ( el && ( el . ownerDocument == document ) ) { // Validate TH element if ( el . nodeName . toLowerCase ( ) != "th" ) { // Traverse up the DOM to find the corresponding TR element elTh = Dom . getAncestorByTagName ( el , "th" ) ; } else { elTh = el ; } return elTh ; } } return null ; }
Returns DOM reference to a TH element.

@method getThEl
@param theadCell {YAHOO.widget.Column | HTMLElement | String} Column instance,
DOM element reference, or string ID.
@return {HTMLElement} Reference to TH element.
Returns DOM reference to a TH element .