B2G/gecko/content/xml/tests/toc/toc.js
// Event handler for display togglers in Table of Contents
Event handler for display togglers in Table of Contents
Event handler for display togglers in Table of Contents
function toggleDisplay(event)
{
  if (event.target.localName != "img")
    return;
  var img = event.target;
  var div = img.nextSibling.nextSibling; 
  if (div.style.display == "none") {
    div.style.display = "block";
    img.src = "minus.gif";
  }
  else {
    div.style.display = "none";
    img.src = "plus.gif";
  }
}
function toggleDisplay ( event ) { if ( event . target . localName != "img" ) return ; var img = event . target ; var div = img . nextSibling . nextSibling ; if ( div . style . display == "none" ) { div . style . display = "block" ; img . src = "minus.gif" ; } else { div . style . display = "none" ; img . src = "plus.gif" ; } }
Event handler for display togglers in Table of Contents
Event handler for display togglers in Table of Contents
// Change the display: property of the container to // hide and show the container.