-
Notifications
You must be signed in to change notification settings - Fork 4
/
search.js
50 lines (46 loc) · 1.31 KB
/
search.js
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
$(document).ready(function()
{
$('#searchtext').on('keyup mousedown',function()
{
if(reqboxopen==1)
{
openclosereqbox();
}
if(isopen==1)
{
opennotiholder();
}
var query = $(this).val();
if(query != '')
{
$.ajax({
url:"search.php",
method:"POST",
data:{query:query},
success:function(data)
{
/*$('.searchlist').fadeIn();*/
$('.searchlist').css("visibility","visible");
$('#overlay').css("opacity","0.5");
$('#overlay').css("z-index","1");
$('.searchlist').html(data);
}
});
}
else
{
/*$('.searchlist').fadeOut();*/
$('.searchlist').css("visibility","hidden");
$('#overlay').css("opacity","0");
$('#overlay').css("z-index","-1");
}
});
});
function selectuser(userid)
{
/*$('#searchtext').val(username);
$('.searchlist').css("visibility","hidden");
$('#overlay').css("opacity","0");
$('#overlay').css("z-index","-1");*/
window.location.href="profile.php?userid="+userid;
}