aboutsummaryrefslogtreecommitdiff
path: root/public/main.js
blob: 30608a44e5947588e0969272d6c6e71917c10f37 (plain) (blame)
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
$(document).ready(function () {
    $(window).scroll(function () {
        $('.hideme').each(function (i) {
            var bottom_of_object = $(this).position().top + $(this).outerHeight();
            var bottom_of_window = $(window).scrollTop() + $(window).height();

            if (bottom_of_window > bottom_of_object) {
                $(this).animate({
                    'opacity': '1'
                }, 500);
            }
        });
    });
    $('.hideme').each(function (i) {
        var bottom_of_object = $(this).position().top + $(this).outerHeight();
        var bottom_of_window = $(window).scrollTop() + $(window).height();

        if (bottom_of_window > bottom_of_object) {
            $(this).animate({
                'opacity': '1'
            }, 500);
        }
        if (document.getElementById("heading")) {
            $(document.getElementById("heading")).animate({
                'opacity': '1'
            }, 500);
        }
        if (document.getElementById("title-quotes")) {
            $(document.getElementById("title-quotes")).animate({
                'opacity': '1'
            }, 1500);
        }
        // document.getElementById("heading").animate({
        //     'opacity': '1'
        // }, 500);
    });
});

$(document).ready(function () {
    var degrees = 0;
    $('.rotateme').click(function rotateMe(e) {
        degrees += 720;
        //$('.rotateme').addClass('rotated'); // for one time rotation

        $('.rotateme').css({
            'transform': 'rotate(' + degrees + 'deg)',
            '-ms-transform': 'rotate(' + degrees + 'deg)',
            '-moz-transform': 'rotate(' + degrees + 'deg)',
            '-webkit-transform': 'rotate(' + degrees + 'deg)',
            '-o-transform': 'rotate(' + degrees + 'deg)'
        });
    });
});