[ Index ]
 

Code source de CMS made simple 1.0.5

Accédez au Source d'autres logiciels libresSoutenez Angelica Josefina !

title

Body

[fermer]

/modules/MenuManager/ -> CSSMenu.js (source)

   1  // Javascript for the CMS CSS Menu Module

   2  // Copyright (c) 2005 Alexander Endresen

   3  // Released under General Public Licence

   4  // This script will emulate the css :hover effect on the menu elements in IE

   5  
   6  // The variables

   7  var cssid = "primary-nav"; // CSS ID for the menuwrapper

   8  var menuadd = "h";  // Character to be added to the specific classes upon hovering. So for example, if this is set to "h", class "menuparent" will become "menuparenth" when hovered over.

   9  var menuh = "menuh"; // Classname for hovering over all other menu items

  10  
  11  if (window.attachEvent) window.attachEvent("onload", cssHover);
  12  
  13  function cssHover() {
  14      var sfEls = document.getElementById(cssid).getElementsByTagName("LI");
  15      for (var i=0; i<sfEls.length; i++) {
  16  
  17          sfEls[i].onmouseover=function() {
  18              if (this.className != "") {
  19                  this.className = this.className + menuadd;
  20              }
  21              else {    
  22                  this.className = menuh;
  23              }
  24          }
  25  
  26          sfEls[i].onmouseout=function() {
  27              if (this.className == menuh) {
  28                  this.className = "";
  29              }
  30              else {
  31                  this.className = this.className.replace(new RegExp(menuadd + "$"), "");
  32              }
  33          }
  34      }
  35  }


Généré le : Tue Apr 3 18:50:37 2007 par Balluche grâce à PHPXref 0.7