jQuery-Highlighter
文件大小: unknow
源码售价: 5 个金币 积分规则     积分充值
资源说明:A key words highlight plugin for jQuery.
## Description
jQuery Highlighter is a key words highlight plugin for jQuery.  
Online test page: 

## Main Futures
1. Support for multiple keywords.
2. Can overlap between multiple keywords.
3. Can cancel the highlighted keywords.

## Quick Start
1. Include jQuery and the Highlighter plugin script file in your HTML page:

        
        

2. In your HTML body create a container tag pair that will hold some text.Give it an id or class attribute (e.g. "News-Pagination"). This attribute can used as the selector for jQuery.
3. Write some text into the previously created container tag, that contain the key words you want to search .
4. Write the JavaScript code in your HTML head:

        

5. Use your favorite browser to view this page, you will see the keywords are marked red.
6. If you want to cancel the highlighted keywords or need to highlight keywords several times within the same container tag:

        // Highlight key words.
        // Note the second argument.
        $("#div_Text").highlight(someKeyWords, {needUnhighlight: true});
        
        // Cancel the highlighted keywords.
        $("#div_Text").unhighlight();

## Available Options
The following list describes what options you have for the second argument of the method "highlight" (option object):

**hClass**  
Specifies the CSS class used to highlight key words.  
Data Type: String  
Default Value: null

**hColor**  
Specifies the color used to highlight key words. If you setted the **hClass** option, this option will be ignored.  
Data Type: String  
Default Value: "#C03"

**separator**  
The symbol used to separate multiple keywords.  
Data Type: String  
Default Value: " "

**wrapper**  
Specifies the HTML tag used to wrap the keywords.  
Data Type: String  
Default Value: "em"

**useDefaultStyle**  
When not set hClass option, specify whether to use the default style to highlight the keywords (eg: use the **hColor** option).  
Data Type: Boolean  
Default Value: true

**needUnhighlight**  
Specifies whether need the function of cancel the highlighted keywords or highlight keywords several times within the same container tag.  
Data Type: Boolean  
Default Value: false

## License
This plugin is licensed under the CDDL v1.0. You can find the full license text here: http://www.opensource.org/licenses/cddl1.txt.

## Contact Information
E-Mail: xujin.net@qq.com
QQ: 22492791

本源码包内暂不包含可直接显示的源代码文件,请下载源码包。