r3323 committed - autocomplete: adding highlighting to select autocomplete
Revision: 3323
Author: joern.zaefferer
Date: Tue Sep 29 13:41:40 2009
Log: autocomplete: adding highlighting to select autocomplete
http://code.google.com/p/jquery-ui/source/detail?r=3323
Modified:
/branches/dev/tests/visual/autocomplete/select.html
=======================================
--- /branches/dev/tests/visual/autocomplete/select.html Tue Sep 29 13:36:21
2009
+++ /branches/dev/tests/visual/autocomplete/select.html Tue Sep 29 13:41:40
2009
@@ -24,7 +24,7 @@
var text = $(this).text();
return {
id: $(this).val(),
- label: text,
+ label: text.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" +
request.term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1")
+ ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>"),
result: text
};
});