(node, cls)
| 50 | function classTest(cls) { return new RegExp("(^|\\s)" + cls + "(?:$|\\s)\\s*") } |
| 51 | |
| 52 | var rmClass = function(node, cls) { |
| 53 | var current = node.className; |
| 54 | var match = classTest(cls).exec(current); |
| 55 | if (match) { |
| 56 | var after = current.slice(match.index + match[0].length); |
| 57 | node.className = current.slice(0, match.index) + (after ? match[1] + after : ""); |
| 58 | } |
| 59 | }; |
| 60 | |
| 61 | function removeChildren(e) { |
| 62 | for (var count = e.childNodes.length; count > 0; --count) |
no test coverage detected