-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfile.js
34 lines (34 loc) · 1.09 KB
/
file.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
$(document).ready(function()
{
$('.contact').click(function (e)
{
$('.card').toggleClass('active');
$('.banner').toggleClass('active');
$('.photo').toggleClass('active');
$('.social-media-banner').toggleClass('active');
$('.email-form').toggleClass('active');
var buttonText = $('button.contact#main-button').text();
if (buttonText === 'back')
{
buttonText = 'click to get in touch';
$('button.contact#main-button').text(buttonText);
}
else
{
buttonText = 'back';
$('button.contact#main-button').text(buttonText);
}
});
});
//turn on to make the photo follow mouse
// $(document).ready(function()
// {
// $(document).mousemove(function( event )
// {
// var docWidth = $(document).width();
// var docHeight = $(document).height();
// var xValue = (event.clientX/docWidth)*100;
// var yValue = (event.clientY/docHeight)*100;
// $('.photo').css('background-position', xValue+'%,'+yValue+'%');
// });
// });