Team:NCTU Formosa/source/head
From 2013.igem.org
(Difference between revisions)
Line 107: | Line 107: | ||
} | } | ||
}); | }); | ||
+ | var originalFontSize = $('.card').css('font-size'); | ||
+ | $(".resetFont").click(function(){ | ||
+ | $('html').css('font-size', originalFontSize); | ||
+ | }); | ||
+ | $(".increaseFont").click(function(){ | ||
+ | var currentFontSize = $('.card').css('font-size'); | ||
+ | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
+ | var newFontSize = currentFontSizeNum*1.2; | ||
+ | $('.card').css('font-size', newFontSize); | ||
+ | return false; | ||
+ | }); | ||
+ | $(".decreaseFont").click(function(){ | ||
+ | var currentFontSize = $('.card').css('font-size'); | ||
+ | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
+ | var newFontSize = currentFontSizeNum*0.8; | ||
+ | $('.card').css('font-size', newFontSize); | ||
+ | return false; | ||
+ | }); | ||
}); | }); | ||
</script> | </script> |
Revision as of 13:04, 19 September 2013