Difference between revisions of "Dynamic Navigation"

From Organic Design
m
Line 98: Line 98:
 
     var reCache = {};
 
     var reCache = {};
 
     return function (element, className) {
 
     return function (element, className) {
       return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
+
       return (reCache[className]
 +
        ? reCache[className]
 +
        : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
 
     };
 
     };
 
  })();
 
  })();

Revision as of 02:13, 19 June 2008

Show/Hide Boxes

This method is from [Page|Wiki News front page], it involves three parts, CSS styles, JavaScript code and a template, which follow here: