Browse Source

Make Sotable compatible xhtml

comparisons of node names (via the nodeName property) are done in upper case. However, nodeName is lower case in xhtml. Let's do everything in upper case.
pull/201/head
raphj 10 years ago
parent
commit
b1daa70a2a
  1. 4
      Sortable.js

4
Sortable.js

@ -809,7 +809,7 @@
do { do {
if ( if (
(tag === '>*' && el.parentNode === ctx) || ( (tag === '>*' && el.parentNode === ctx) || (
(tag === '' || el.nodeName == tag) && (tag === '' || el.nodeName.toUpperCase() == tag) &&
(!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length) (!selector.length || ((' ' + el.className + ' ').match(re) || []).length == selector.length)
) )
) { ) {
@ -937,7 +937,7 @@
*/ */
function _index(/**HTMLElement*/el) { function _index(/**HTMLElement*/el) {
var index = 0; var index = 0;
while (el && (el = el.previousElementSibling) && (el.nodeName !== 'TEMPLATE')) { while (el && (el = el.previousElementSibling) && (el.nodeName.toUpperCase() !== 'TEMPLATE')) {
index++; index++;
} }
return index; return index;

Loading…
Cancel
Save