Adjusting font size in javascript string

I'm messing around with some countdown script. I can't seem to adjust the size of the numbers. Where can I adjust the font and font size in this?

var eventdate = new Date("February 20, 2014 11:00:00");

function toSt(n) {
    s = ""
    if (n < 10) s += "0"
    return s + n.toString();
}

function countdown() {
    cl = document.clock;
    d = new Date();
    count = Math.floor((eventdate.getTime() - d.getTime()) / 1000);
    if (count <= 0) {
        cl.days.value = "----";
        cl.hours.value = "--";
        cl.mins.value = "--";
        cl.secs.value = "--";
        return;
    }
    cl.secs.value = toSt(count % 60);
    count = Math.floor(count / 60);
    cl.mins.value = toSt(count % 60);
    count = Math.floor(count / 60);
    cl.hours.value = toSt(count % 24);
    count = Math.floor(count / 24);
    cl.days.value = count;
    setTimeout("countdown()", 500);
}

Answers


You can do any CSS manipulations in your JS VIA .css() property of jQuery.

http://api.jquery.com/css/


This is one way to set the font size:

var str = "Hello World!";
var result = str.fontsize(7);

And as said on above comments the CSS is also another option.


Need Your Help

Convert utf8-characters to iso-88591 and back in PHP

php encoding utf-8 iso-8859-1

Some of my script are using different encoding, and when I try to combine them, this has becom an issue.

EXC_BAD_ACCESS when reading file data into 2d array

c++ ios c xcode exc-bad-access

I am trying to load filedata into a 2d array, but when calling fread I am getting an EXC_BAD_ACCESS error.