|
|
Line 7: |
Line 7: |
| <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> | | <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script> |
| <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> | | <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script> |
− |
| |
− | <!-- Functionallity and behaviour JS -->
| |
− | <script>
| |
− |
| |
− | $(document).ready(function(){
| |
− |
| |
− | //Loading screen functionallity
| |
− | $('.loading').animate(
| |
− | {opacity:0},
| |
− | 500,
| |
− | function(){
| |
− | $('.loading').attr("style", "display:none");
| |
− | }
| |
− | );
| |
− |
| |
− | //Height responsiveness
| |
− | $(window).resize(function() {
| |
− | wheight = $(window).height();
| |
− | $('.container').attr("style","height:"+(wheight)+"px;background-size:cover;");
| |
− | $('.team-member-container').attr("style","height:"+wheight/2.7+"px;");
| |
− | });
| |
− |
| |
− | $(window).trigger('resize');
| |
− |
| |
− | //Menu moveto container on item click functionallity
| |
− | $('.menu-item').on('click', function(){
| |
− | $('.menu-item').removeClass('subselected');
| |
− | $(this).addClass('subselected');
| |
− | if($(this).attr("data")=="#top"){
| |
− | $('html, body').animate({
| |
− | scrollTop: 0
| |
− | }, 1000);
| |
− | }else{
| |
− | $('html, body').animate({
| |
− | scrollTop: $($(this).attr("data")).offset().top-70
| |
− | }, 1000);
| |
− | }
| |
− | });
| |
− |
| |
− | //Hover of team members
| |
− | $('.team-member-container').on('mouseenter', function(){
| |
− | $(this).children('.team-member-photo').attr("style", "background-image:url('"+$(this).attr("hover")+"');");
| |
− | $(this).on('mouseleave', function(){
| |
− | $(this).children('.team-member-photo').attr('style', "background-image:url('"+$(this).attr("data")+"');");
| |
− | });
| |
− | });
| |
− |
| |
− | });
| |
− |
| |
− | </script>
| |
| | | |
| <style> | | <style> |