getData will now allow dashed class names; e.g. "sorter-my-custom-parser"

This commit is contained in:
Mottie 2013-03-18 19:50:30 -05:00
parent a1106c0fc0
commit 07d7c1c749

View File

@ -1163,8 +1163,8 @@
} else if (ch && typeof ch[key] !== 'undefined') { } else if (ch && typeof ch[key] !== 'undefined') {
val += ch[key]; val += ch[key];
} else if (cl !== ' ' && cl.match(' ' + key + '-')) { } else if (cl !== ' ' && cl.match(' ' + key + '-')) {
// include sorter class name "sorter-text", etc // include sorter class name "sorter-text", etc; now works with "sorter-my-custom-parser"
val = cl.match( new RegExp(' ' + key + '-(\\w+)') )[1] || ''; val = cl.match( new RegExp('\\s' + key + '-([\\w-]+)') )[1] || '';
} }
return $.trim(val); return $.trim(val);
}; };