Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var CLASS_NAME = "className",
- BOUNDING_BOX = "boundingBox",
- SKIN_PREFIX = "yui-skin-",
- SKIN_REGEXP = new RegExp("(?:^|\\s)" + SKIN_PREFIX + "(\S+)");
- ...
- getActiveSkin : function() {
- var match;
- this.get(BOUNDING_BOX).ancestor(
- function(n) {
- return n.get(CLASS_NAME).match(SKIN_REGEXP);
- }
- );
- return (match && match[1] || null);
- }
Add Comment
Please, Sign In to add comment