This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//NOTES: Requires Jquery - version 2.2.0 was used during development but may work on earlier version | |
// Add style by defining highlight class | |
/*Searh text highlighter*/ | |
$highlighter = (function(){ | |
function highlightHtml(source, searchInput) { | |
var node = $.type(source) == "object" ? source : $($.parseHTML("<div>" + source + "</div>")); | |
if (node.children().length > 0) { | |
//wrap the text contents with a span |