Skip to content

Commit 6ec9247

Browse files
committedApr 15, 2014
Code cleanup
1 parent ada0563 commit 6ec9247

File tree

1 file changed

+1
-62
lines changed

1 file changed

+1
-62
lines changed
 

‎EDAV-assignment1.html

+1-62
Original file line numberDiff line numberDiff line change
@@ -982,66 +982,5 @@ <h2><A NAME="getintouch">Get in touch</A></h2>
982982
<p>Copyright (c) 2014 Andrew Yuan. No rights reserved. | Photos by <a href="#">Me</a> | Design by <a href="http://www.freecsstemplates.org/" rel="nofollow">CSS Templates</a>.</p>
983983
</div>
984984
</body>
985-
<script>
986-
/*
987-
var main = {
988-
989-
onReady: function() {
990-
$(window).on('scroll', main.toggleOpacity);
991-
$('.image-popup-no-margins').magnificPopup({
992-
type: 'image',
993-
closeOnContentClick: true,
994-
closeBtnInside: false,
995-
fixedContentPos: true,
996-
mainClass: 'mfp-no-margins mfp-with-zoom', // class to remove default margin from left and right side
997-
image: {
998-
verticalFit: true
999-
},
1000-
zoom: {
1001-
enabled: true,
1002-
duration: 500 // don't foget to change the duration also in CSS
1003-
}
1004-
});
1005-
$('.simple-ajax-popup-align-top').magnificPopup({
1006-
type: 'ajax',
1007-
alignTop: true,
1008-
overflowY: 'scroll' // as we know that popup content is tall we set scroll overflow by default to avoid jump
1009-
});
1010-
},
1011-
1012-
toggleOpacity: function(){
1013-
var fadeBegin = 1, fadeFinish = 700, fadingElement = $('#aboutme');
1014-
var divPosition = { "elem1":{"name":"#aboutme", "fadeBegin":0, "fadeFinish":800},
1015-
"elem2":{"name":"#portfolio", "fadeBegin":500, "fadeFinish":1400},
1016-
"elem3":{"name":"#contact", "fadeBegin":1000, "fadeFinish":2000}
1017-
};
1018-
1019-
var offset = $(document).scrollTop();
1020-
//console.log("offset=" + offset);
1021-
1022-
$.each(divPosition, function( i, elem ) {
1023-
var opacity = 1;
1024-
fadingElement = $(elem["name"]);
1025-
fadeBegin = elem["fadeBegin"];
1026-
fadeFinish = elem["fadeFinish"];
1027-
1028-
//console.log(fadingElement);
1029-
1030-
if( offset < fadeBegin ){
1031-
//opacity = fadeBegin/(4*offset);
1032-
opacity = 0;
1033-
} else if( offset >= fadeFinish ){
1034-
//opacity = fadeFinish/(4*offset);
1035-
opacity = 0;
1036-
}
1037-
//console.log(opacity)
1038-
fadingElement.stop().animate({opacity: opacity}, 300);
1039-
});
1040-
}
1041-
};
1042-
1043-
$( document ).ready( main.onReady );
1044-
1045-
1046-
</script>
985+
1047986
</html>

0 commit comments

Comments
 (0)