How to prevent "uncaught exception: Syntax error, unrecognized expression" in jQuery tablesorter?
I use the automatical identification of column data types of jQuery tablesorter. In one of my columns I have some voltage ranges, such as "±10 V". This seems to disturb ei开发者_JAVA技巧ther tablesorter or whatever:
uncaught exception: Syntax error, unrecognized expression: ±10 V
I'm not sure even how to debug this problem. Does anybody have an idea? Many thanks!
if the problem is the ± then use the ±
HTML escape
reference: http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references
why don't you use ±
instead of ±
can also add this jquery code to your value that will do it automaticaly
var result = oldValue.replace('±', '±');
EDIT: since you say previous solution doesn't work, have you tryed this? just force string type. might work.
value.toString()
精彩评论