$(document).ready(function () { var fonte = 2; var contraste = 0; $('#aumenta_fonte').click(function () { fonte++; if (fonte == 5) { fonte--; } else { if (fonte == 4) { $('*').css({ 'font-size': 18 + 'px' }); } if (fonte == 3) { $('*').css({ 'font-size': 16 + 'px' }); } if (fonte == 2) { $('*').css({ 'font-size': '' }); } } }); $('#reduz_fonte').click(function () { fonte--; if (fonte == 0) { fonte++; } else { if (fonte == 3) { $('*').css({ 'font-size': 16 + 'px' }); } if (fonte == 2) { $('*').css({ 'font-size': '' }); } if (fonte == 1) { $('*').css({ 'font-size': 10 + 'px' }); } } }); $('#altocontraste').click(function () { contraste++; if (contraste == 1) { $('*').attr('style', 'background-color: black !important; color: white !important'); } else { $('*').css({ 'background-color': '' }); $('*').css({ 'color': '' }); contraste = 0; } }); });