Team:Edinburgh/tech/Navbox
From 2011.igem.org
(Difference between revisions)
Line 9: | Line 9: | ||
$(document).ready(function(){ | $(document).ready(function(){ | ||
// Reset Font Size | // Reset Font Size | ||
- | var originalFontSize = $(' | + | var originalFontSize = $('html').css('font-size'); |
$(".resetFont").click(function(){ | $(".resetFont").click(function(){ | ||
$('html').css('font-size', originalFontSize); | $('html').css('font-size', originalFontSize); | ||
Line 15: | Line 15: | ||
// Increase Font Size | // Increase Font Size | ||
$(".increaseFont").click(function(){ | $(".increaseFont").click(function(){ | ||
- | var currentFontSize = $(' | + | var currentFontSize = $('html').css('font-size'); |
var currentFontSizeNum = parseFloat(currentFontSize, 10); | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
var newFontSize = currentFontSizeNum*1.2; | var newFontSize = currentFontSizeNum*1.2; | ||
Line 23: | Line 23: | ||
// Decrease Font Size | // Decrease Font Size | ||
$(".decreaseFont").click(function(){ | $(".decreaseFont").click(function(){ | ||
- | var currentFontSize = $(' | + | var currentFontSize = $('html').css('font-size'); |
var currentFontSizeNum = parseFloat(currentFontSize, 10); | var currentFontSizeNum = parseFloat(currentFontSize, 10); | ||
var newFontSize = currentFontSizeNum*0.8; | var newFontSize = currentFontSizeNum*0.8; |
Revision as of 16:45, 21 September 2011