Changes

485 bytes removed ,  22:10, 7 November 2009
delete redundant element class test section
Line 181: Line 181:  
addOnloadHook( createCollapseButtons );
 
addOnloadHook( createCollapseButtons );
   −
/** Test if an element has a certain class **************************************
  −
*
  −
* Description: Uses regular expressions and caching for better performance.
  −
* Maintainers: [[User:Mike Dillon]], [[User:R. Koot]], [[User:SG]]
  −
*/
  −
  −
var hasClass = (function() {
  −
var reCache = {};
  −
return function( element, className ) {
  −
return (reCache[className] ? reCache[className] : (reCache[className] = new RegExp("(?:\\s|^)" + className + "(?:\\s|$)"))).test(element.className);
  −
};
  −
})();
      
/** Dynamic Navigation Bars (experimental) *************************************
 
/** Dynamic Navigation Bars (experimental) *************************************