Find the right divID for the right CSS div

Discussion in 'JavaScript' started by PhpRay, Jul 30, 2009.

  1. #1
    I found a script that allow me to move a div over another one to cover it, the classic collapse to hide a div with a div behind him...

    But in my template I have a column with many different divs to hide so I think I need to indicate to the script which is the div to hide anytime... but I can't find the way to do it...

    I've tryied to change this in the html/body:

    <p><a href="javascript:collapse2.slideit()">Nascondi/Mostra</a></p>
    Code (markup):
    But in anyway I try to change it also saving a second script and re-call it with a different name in tha <a> tag, it'll ever close the same div...

    I see that the Javascript has this:
    
    this.divId=divId
    this.divObj=document.getElementById(divId)
    Code (markup):
    But I don't know how to set a var or a value to indicate the right div anytime..

    Anyone of you know how I can work this out ?

    Thx a lot!!
     
    Last edited: Jul 30, 2009
    PhpRay, Jul 30, 2009 IP