diff --git a/konova/templates/konova/widgets/checkbox-tree-select.html b/konova/templates/konova/widgets/checkbox-tree-select.html index 3129be8a..c2b107cc 100644 --- a/konova/templates/konova/widgets/checkbox-tree-select.html +++ b/konova/templates/konova/widgets/checkbox-tree-select.html @@ -41,7 +41,11 @@ var elem = $(this); var val = elem.val() var allTreeElements = $(".tree-element") - var allTreeElementsContain = $(".tree-element:contains(" + val + ")") + var allTreeElementsContain = $(".tree-element").filter(function(){ + var reg = new RegExp(val, "i"); + return reg.test($(this).text()); + } + ); if(val.length > 0){ allTreeElements.hide() allTreeElementsContain.show()