[thelist] getElementBy Class?

Rachell rachell at kingestatewinery.com
Wed Mar 16 16:50:44 CST 2005


(I know ya'all are probably getting sick of me, but I can't help it -- I
keep running into stumbling blocks left and right and you guys have been my
savoirs!)

I was using this javascript to make my Div ID mouseovers work. 

function show(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='visible';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'visible';
    else if (document.all)
        document.all[object].style.visibility = 'visible';
}

function hide(object) {
    if (document.getElementById && document.getElementById(object) != null)
         node = document.getElementById(object).style.visibility='hidden';
    else if (document.layers && document.layers[object] != null)
        document.layers[object].visibility = 'hidden';
    else if (document.all)
         document.all[object].style.visibility = 'hidden';
}

but I want to use getElementByClass instead of ID.  I've tried various
different ways to make it work, but knowing so little of javascript, nothing
has -- does anyone know what changes need to be done to this script to make
the mouseovers on this page work?
http://www.kingestate.com/newdesign/Domaine/Estate/Gardens-test.htm 

Rachell Coe
Webmaster
King Estate Winery
541-942-9874  Ext: 136
http://www.kingestate.com 




More information about the thelist mailing list