-
Notifications
You must be signed in to change notification settings - Fork 1
/
app.js
42 lines (35 loc) · 1 KB
/
app.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
$(function(){
$("#siteName").fadeIn(3000);
$("i").fadeToggle(3000);
$( window ).on("load", function() {
$( "#grid" ).fadeIn(3000);
});
});
$(function(){
$("#submitPost").on("submit",function(){
textarea = $("textarea");
if(textarea.val() == "" || textarea.val() == null)
{
alert("Digite o conteúdo do spotted");
return(false);
}
return(true);
});
});
$(document).ready(function() {
if (location.pathname.substring().search("admin") >= 0) {
var rows = ($(".adminCol").length)/3;
if (rows < 2) {
$("body").addClass("small");
$(".adminPages").addClass("smallPages");
} else if (rows < 3){
$(".adminPages").addClass("mediumPages");
$("body").addClass("medium");
} else if (rows >= 3) {
$(".adminPages").addClass("bigPages");
}
} else if (location.pathname.substring().search("sobre") >= 0 || location.pathname.substring().search("newspotted") >= 0) {
$("body").addClass("small");
};
});
// $(".adminCol").length;