Skip to content

Commit 9aba087

Browse files
committed
Create README.md
1 parent 59fae13 commit 9aba087

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# jquery-search-highlight
2+
搜索页面关键字高亮显示
3+
==========================================
4+
5+
#### exact (string, default value:"exact")
6+
"exact" : 完全匹配
7+
8+
"whole" : 部分匹配单词,但高亮整个单词
9+
10+
"partial": 部分匹配
11+
12+
13+
#### style_name (string, default value:"hilite")
14+
高亮样式的名称
15+
16+
17+
#### style_name_suffix (boolean, default value:true)
18+
如果为true表明,每种风格将会增加一个数字。(hilite1 hilite2 hilite3…)这有助于找到特定的匹配和风格不同。
19+
20+
21+
#### highlight (jQuery selector or object, default value:null)
22+
需要匹配的范围
23+
24+
25+
#### nohighlight (jQuery selector or object, default value:null)
26+
不需要匹配的范围
27+
28+
29+
#### keys (string, default value:null)
30+
搜索的关键字
31+
32+
33+
```js
34+
var highLightOptions = {
35+
exact:"partial",
36+
style_name_suffix:false,
37+
highlight:"#highlightScope",
38+
keys:"key1 key2 key3"
39+
};
40+
41+
$(document).SearchHighlight(highLightOptions);
42+
```

0 commit comments

Comments
 (0)