Browse Source

#44: Support SVG

svg
RubaXa 11 years ago
parent
commit
008b9cd96d
  1. 9
      Sortable.js

9
Sortable.js

@ -430,12 +430,19 @@
var
tag = selector.shift().toUpperCase()
, re = new RegExp('\\s('+selector.join('|')+')\\s', 'g')
, className
;
do {
className = el.className;
if (className && className.baseVal) { // SVG
className = className.baseVal;
}
if(
(tag === '' || el.nodeName == tag)
&& (!selector.length || ((' '+el.className+' ').match(re) || []).length == selector.length)
&& (!selector.length || ((' '+className+' ').match(re) || []).length == selector.length)
){
return el;
}

Loading…
Cancel
Save