Open main menu
Home
System
Alimentary
Cardiovascular
Endocrine
Integumentary
Lymphoreticular and Haemopoietic
Musculoskeletal
Nervous
Reproductive
Respiratory
Special Senses
Urinary
Species
Birds
Camelids
Cats
Cattle
Dogs
Donkeys
Ferrets
Fish
Horses
Pigs
Rabbits
Rodents
Sheep and Goats
Snake
Discipline
Anatomy and Physiology
Bacteriology
Blood
Clinical
Epidemiology
Normal Values
Nursing
Nutrition
Parasitology
Pathology
Pharmacology
Virology
Resources
Collection
CPD
Drag & Drop
LabFacts NWL Book
Flashcards
Lectures
Links
Podcasts
Proceedings
Quizzes
Veterinary Jobs
Videos
Login
About WikiVet
Search
Changes
Special:WhatLinksHere/User:MaureenWanjira
>
Special:History/Classical Swine Fever
>
Special:UserLogin
>
Enzootic Pneumonia - Calves
>
Special:MobileDiff/55300
← Older edit
Newer edit →
MediaWiki:Common.js
(view source)
Revision as of 20:38, 28 February 2010
513 bytes added
,
20:38, 28 February 2010
no edit summary
Line 1:
Line 1:
/* Any JavaScript here will be loaded for all users on every page load. */
/* Any JavaScript here will be loaded for all users on every page load. */
+
+
/* 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);
+
};
+
})();
+
// ============================================================
// ============================================================
// BEGIN Dynamic Navigation Bars (experimantal)
// BEGIN Dynamic Navigation Bars (experimantal)
A.allison
Author,
Bureaucrats
,
Administrators
12,693
edits