Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Check if an element has the specified class.
- function hasClass(el, cls) {
- return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement