File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change
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
+ ```
You can’t perform that action at this time.
0 commit comments