-
Notifications
You must be signed in to change notification settings - Fork 0
/
events.js
105 lines (95 loc) · 2.3 KB
/
events.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
//Jquery for events and fancy scripts
$(document).ready(function(){
$('#itemB1').hide();
$('#itemB1a').hide();
$('#itemC1').hide();
$('#itemC1a').hide();
$('#items2').hover(function(){
$('#itemC1').show();
$('#itemC1a').show();
}, function(){
$('#itemC1').hide();
$('#itemC1a').hide();
});
$('#items').hover(function(){
$('#itemB1').show();
$('#itemB1a').show();
}, function(){
$('#itemB1').hide();
$('#itemB1a').hide();
});
$('#thumb1').click(function(){
$('.carousel').carousel(0);
});
$('#thumb2').click(function(){
$('.carousel').carousel(1);
});
$('#thumb3').click(function(){
$('.carousel').carousel(2);
});
$('#thumb4').click(function(){
$('.carousel').carousel(3);
});
$('#like').hover(function(){
$('#like').popover('show');
}, function(){
$('#like').popover('destroy');
});
$('#want').hover(function(){
$('#want').popover('show');
}, function(){
$('#want').popover('destroy');
});
$('#own').hover(function(){
$('#own').popover('show');
}, function(){
$('#own').popover('destroy');
});
$('#question').click(function(){
var $this = $(this);
if($this.data('clicked')) {
}
else {
$this.data('clicked', true);
$('#question').popover('show');
}
});
$('#question2').click(function(){
var $this = $(this);
if($this.data('clicked')) {
}
else {
$this.data('clicked', true);
$('#question2').popover('show');
}
});
$('#myTabA').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
$('#myTabB').click(function (e) {
e.preventDefault();
$(this).tab('show');
});
$(".comment").shorten();
$(".comment-small").shorten({showChars: 10});
$("div").click(function () {
var color = $(this).css("background-color");
$("#result").html("That div is <span style='color:" +
color + ";'>" + color + "</span>.");
});
$('#searchButton').click(function(){
$('#alert2').css({"visibility":"hidden"});
$('#alert1').css({"visibility":"visible"});
});
$('#category').click(function(){
$('#alert1').css({"visibility":"hidden"});
$('#alert2').css({"visibility":"visible"});
});
//Sticky footer
$(function(){
$(window).scroll(function() {
$('#stickyFooter').toggle($(document).scrollTop() > 100);
});
})
});