forked from designmodo/Flat-UI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapplication.js
51 lines (40 loc) · 1.15 KB
/
application.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
// Some general UI pack related JS
$(function () {
// Custom selects
$("select").dropkick();
});
$(document).ready(function() {
// Todo list
$(".todo li").click(function() {
$(this).toggleClass("todo-done");
});
// Init tooltips
$("[data-toggle=tooltip]").tooltip("show");
// Init tags input
$("#tagsinput").tagsInput();
// Init jQuery UI slider
$("#slider").slider({
min: 1,
max: 5,
value: 2,
orientation: "horizontal",
range: "min",
});
// JS input/textarea placeholder
$("input, textarea").placeholder();
// Make pagination demo work
$(".pagination a").click(function() {
if (!$(this).parent().hasClass("previous") && !$(this).parent().hasClass("next")) {
$(this).parent().siblings("li").removeClass("active");
$(this).parent().addClass("active");
}
});
$(".btn-group a").click(function() {
$(this).siblings().removeClass("active");
$(this).addClass("active");
});
// Disable link click not scroll top
$("a[href='#']").click(function() {
return false
});
});