You can use jQueryUI's slider to do this quite easily.
Here is a link to the web page jQueryUI Slider.
Put something in your HTML for the slider,
Then put something like this in your JavaScript:
$( ".slider" ).slider({
change: function( event, ui ) {
$().css("font-size",(ui.value+"px"));
}
});