VågaSvenska

VågaSvenska dares people to speak Swedish. I developed the back-end php and JavaScript for this webpage. They had a novel idea about putting a flag if you support speaking Swedish in Finland. I was able to formulate the idea in to back-end code and JavaScript code. I did not design the concept but I think it is totally cool.

For waving the flags I used 3D rotations and jQuery Transit.

Code

<script src="http://code.jquery.com/jquery-1.10.2.js"></script>
<script src="http://ricostacruz.com/jquery.transit/jquery.transit.min.js"></script>
<script type="text/javascript">
        function animate() {
		$(".flag").css({
			transformOrigin : "90px 25px"
		}).transition({
			rotate3d : "90,0,0,30deg"
		}, 1500).transition({
			rotate3d : '0,0,0,0deg'
		}, 3000);
	}
	function startAnim() {
		setInterval(function() {
			animate()
		}, 3000);
	}
	$(window).load(function() {
    	startAnim();
	});
</script>
<div class="flag"><p style="text-align: center;"><span style="color: #000000;"><a href="http://www.ridvandongelci.com/wp-content/uploads/2014/06/flag13.png"><img class="alignnone size-full wp-image-54" src="http://www.ridvandongelci.com/wp-content/uploads/2014/06/flag13.png" alt="flag" width="184" height="260" /></a></span></p></div>

Example

flag

Leave a Reply

Your email address will not be published. Required fields are marked *