-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.js
More file actions
56 lines (42 loc) · 1.37 KB
/
main.js
File metadata and controls
56 lines (42 loc) · 1.37 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
// Scroll Reveal instructions
window.sr = ScrollReveal();
sr.reveal('.aboutTitle', {duration: 2000}, 500);
sr.reveal('.aboutRuler', {duration: 2000}, 500);
sr.reveal('.introTitle', {duration: 2000}, 500);
sr.reveal('.overview', {duration: 2000}, 500);
sr.reveal('.portfolio-box', {duration: 2000}, 500);
// Smooth Scroll on href clicks
$(document).ready(function(){
$('a[href^="#1"]').on('click', function(event) {
var target = $(this.getAttribute('href'));
if( target.length ) {
event.preventDefault();
$('html, body').stop().animate({
scrollTop: target.offset().top
}, 1000);
}
});
});
// Calling sticky.js and for the sticky navbar.
$(document).ready(function(){
$("nav").sticky({topSpacing:0});
});
$("#accordion").accordion({ collapsible: true, active: false });
$(document).ready(function () {
$('.accordion-toggle').on('click', function(event){
// create accordion variables
var accordion = $(this);
var accordionContent = accordion.next('.accordion-content');
});
});
// popover function
$(function () {
$('[data-toggle="popover"]').popover( { trigger: 'hover' } )
});
// button opening new windows for projects
$(function () {
$(".btn-outline-danger").on('click', function(e) {
var open = "http://" + this.value;
window.open(open);
})
})