-
Notifications
You must be signed in to change notification settings - Fork 1
/
javascript.php
53 lines (46 loc) · 1.64 KB
/
javascript.php
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
<!-- javascript -->
<script src="http://code.jquery.com/jquery.js"></script>
<script src="js/jquery-1.7.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js/stickyMojo.js"></script>
<script src="js/jquery.fitvids.min.js"></script>
<script type="text/javascript" src="//use.typekit.net/csp2vcm.js"></script>
<script type="text/javascript">try{Typekit.load();}catch(e){}</script>
<script>
function scrollToElement(selector, time, verticalOffset) {
time = typeof(time) != 'undefined' ? time : 500;
verticalOffset = typeof(verticalOffset) != 'undefined' ? verticalOffset : 0;
element = $(selector);
offset = element.offset();
offsetTop = offset.top + verticalOffset;
$('html, body').animate({
scrollTop: offsetTop
}, time);
}
$(document).ready(function() {
$('.xbook').popover();
$('.popover-element').popover();
$('.video').fitVids();
$('#scroll-to-marketing').click(function (e) {
e.preventDefault();
scrollToElement('#marketing');
});
$('a#why-facebook').tooltip({
placement: 'bottom',
trigger: 'hover',
title: 'We encourage you to use Facebook to log in so that you are connected to your campus network.'
});
// drawer menu
$('.landing-nav').addClass('js').before('<div id="menu" class="pull-right">Menu</div>');
$('#menu').click(function(){
$('.landing-nav').toggle();
});
$(window).resize(function(){
if(window.innerWidth > 768) {
$(".landing-nav").removeAttr("style");
}
});
//this must go at the end
$('nav#info,#transaction-sidebar').stickyMojo({footerID: '#footer', contentID: '.info-body,#transaction-body'});
});
</script>