-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathscripts.js
More file actions
84 lines (72 loc) · 2.62 KB
/
scripts.js
File metadata and controls
84 lines (72 loc) · 2.62 KB
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
$(document).ready(function(){
//PHOTOSETS
$('.photo-slideshow').pxuPhotoset({
// options go here
'highRes' : true, // will use high res images
'rounded' : 'false', // corners, all or false
'exif' : false, // display EXIF data if available (tooltip)
'captions' : false, // display individual captions on photos (tooltip)
'gutter' : '10px', // spacing between the images
'photoset' : '.photo-slideshow', // photoset wrapper
'photoWrap' : '.photo-data', // photo data wrapper (includes photo, icons + exif)
'photo' : '.pxu-photo' // photo wrap (includes photo only)
}, function() {
// callback
$( ".tumblr-box" ).click(function() {
//Turn keyboard off when using photosets
document.body.onkeydown = function(e){
if (e == null) {
keycode = event.keyCode;
}
else {
keycode = e.which;
}
if(keycode == 39){
}
else if(keycode == 37){
}
else if(keycode == 191){
$("#sb-site").fadeOut();
//alert('Random')
setTimeout(function(){
window.location = $('#random').attr('href');
},100);}
};
});
});
var headHeight = document.getElementById('header').clientHeight;
$("#headerBackground").css({ "height": headHeight});
$("#headerTint").css({ "height": headHeight});
});//end ready
$(window).load(function() {
//alert("window is loaded");
document.body.focus();
});
//end load
//GLOBAL
function askOn(){
if( $('#ask').css('display') == "block" ){
document.getElementById("ask").style.display = 'none';}
else {
var askSource = document.getElementById("askSource").href;
document.getElementById("askBox").src=askSource;
document.getElementById("ask").style.display = 'block';
document.getElementById("submit").style.display = 'none';
scroll();}
}
//SUBMIT
function submitOn(){
if( $('#submit').css('display') == "block" ) {
document.getElementById("submit").style.display = 'none';}
else {
var submitSource = document.getElementById("submitSource").href;
document.getElementById("submitBox").src=submitSource;
document.getElementById("submit").style.display = 'block';
document.getElementById("ask").style.display = 'none';
scroll();}
}
//SCROLL TO
function scroll() {
$('html, body').animate({scrollTop: $(".asksubmit").offset().top}, 500);
window.location.hash="content"; //FALL BACK
}