Advertisement
Guest User

Untitled

a guest
Apr 25th, 2015
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.14 KB | None | 0 0
  1. // Check if an element has the specified class.
  2. function hasClass(el, cls) {
  3. return (' ' + el.className + ' ').indexOf(' ' + cls + ' ') > -1;
  4. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement