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 var
tag = selector.shift().toUpperCase() tag = selector.shift().toUpperCase()
, re = new RegExp('\\s('+selector.join('|')+')\\s', 'g') , re = new RegExp('\\s('+selector.join('|')+')\\s', 'g')
, className
; ;
do { do {
className = el.className;
if (className && className.baseVal) { // SVG
className = className.baseVal;
}
if( if(
(tag === '' || el.nodeName == tag) (tag === '' || el.nodeName == tag)
&& (!selector.length || ((' '+el.className+' ').match(re) || []).length == selector.length) && (!selector.length || ((' '+className+' ').match(re) || []).length == selector.length)
){ ){
return el; return el;
} }

Loading…
Cancel
Save