Permalink
Browse files

make hasClass() compatible with SVG DOM where SVGAnimatedString is used

  • Loading branch information...
David Durman
David Durman committed Apr 5, 2012
1 parent e0fd490 commit 6bb982f8aab31a31e2fde9de284f70388f1e648a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/zepto.js
View
@@ -343,7 +343,7 @@ var Zepto = (function() {
},
hasClass: function(name){
if (this.length < 1) return false;
- else return classRE(name).test(this[0].className);
+ else return classRE(name).test(this[0].className.baseVal === undefined ? this[0].className : this[0].className.baseVal);
},
addClass: function(name){
return this.each(function(idx) {

0 comments on commit 6bb982f

Please sign in to comment.