Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 6bb982f8aab31a31e2fde9de284f70388f1e648a 1 parent e0fd490
David Durman authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  src/zepto.js
View
2  src/zepto.js
@@ -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) {
Please sign in to comment.
Something went wrong with that request. Please try again.