code: function(searchVal) {
      searchVal = searchVal.trim().toLowerCase();
      for (var key in treeObject) {
        var me = treeObject[key];
        if (me.val.indexOf(searchVal) !== -1 || searchVal.length == 0) {
          $(tocList[key]).show();
          if ($(tocList[me.parent]).is(":hidden")) {
           showParents(key);
          }
        } else {
          $(tocList[key]).hide();
        }
      }
    }
docs: Perform the search