// fixs highlight search
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -20,6 +20,9 @@
|
||||
background-color: white
|
||||
border-color: #ccc!important
|
||||
|
||||
.highlight
|
||||
background-color: #FFFF00
|
||||
|
||||
.badge
|
||||
background-color: $secondary-color
|
||||
&.badge-success
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function() {
|
||||
$('body').highlight('{$query}');
|
||||
$('#content .panel').highlight('{$query}');
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
|
||||
highlight v3
|
||||
highlight v4
|
||||
|
||||
Highlights arbitrary terms.
|
||||
|
||||
@@ -37,9 +37,9 @@ jQuery.fn.highlight = function(pat) {
|
||||
}
|
||||
return skip;
|
||||
}
|
||||
return this.each(function() {
|
||||
return this.length && pat && pat.length ? this.each(function() {
|
||||
innerHighlight(this, pat.toUpperCase());
|
||||
});
|
||||
}) : this;
|
||||
};
|
||||
|
||||
jQuery.fn.removeHighlight = function() {
|
||||
@@ -50,4 +50,4 @@ jQuery.fn.removeHighlight = function() {
|
||||
normalize();
|
||||
}
|
||||
}).end();
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user