如何在jquery中突出显示搜索文本
如何突出显示搜索文本。我得到了很多链接 最好的例子就是这样。 现在我需要在我的示例中实现最好的方法,但它不起作用, 这是我的小提琴如何在jquery中突出显示搜索文本,jquery,Jquery,如何突出显示搜索文本。我得到了很多链接 最好的例子就是这样。 现在我需要在我的示例中实现最好的方法,但它不起作用, 这是我的小提琴 hightlight是什么意思?就像chrome一样,我想实际上我无法导入。实际上我需要ipad,是的,我需要chrome,就像我们使用contr+F一样 var searcher = $("#realTimeContents").search({ searchType: "highlightSelected",
hightlight是什么意思?就像chrome一样,我想实际上我无法导入。实际上我需要ipad,是的,我需要chrome,就像我们使用contr+F一样
var searcher = $("#realTimeContents").search({
searchType: "highlightSelected",
searchSelector : "div",
scrollTo : true
});
//make sure we find the same text, otherwise clear search postions
function find(up) {
var currentText = searcher.getText();
var text = $(".textSearchvalue_h").val();
alert(text);
if (text != currentText) {
searcher.setText(text);
// alert(getConcurrencesNumber());
}
searcher.nextConcurrence(up);
}
//bind events
$("#prev").click(function(e) {
alert("pre")
e.preventDefault();
find(true);
});
$("#next").click(function(e) {
alert("next")
e.preventDefault();
find(false);
});
$("#search").click(function(e) {
e.preventDefault();
find(true);
});