-
Notifications
You must be signed in to change notification settings - Fork 0
/
try.php
31 lines (31 loc) · 1.55 KB
/
try.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/mark.js/8.6.0/jquery.mark.min.js"></script>
<script>
$(document).ready(function(){
$(function() {
var mark = function() {
// Read the keyword
var keyword = $("input[name='keyword']").val();
// Remove previous marked elements and mark
// the new keyword inside the context
$(".context").unmark({
done: function() {
$(".context").mark(keyword);
}
});
};
$("input[name='keyword']").on("blur", mark);
$("input[type='checkbox']").on("click", mark);
});
});
</script>
</head>
<body>
<input type="text" name="keyword" class="form-control input-sm" placeholder="TYPE THE TEXT">
<input type="submit" name="sub" value="Explore" />
<p class="context">Click me away!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!Click me too!</p>
</body>
</html>