I have a unique function that incrementally increases the date by one day every second. Once the date matches specific dates, I aim to update my #newsDiv with extra text content. The #newsDiv will display all historical "news" and will be set to scroll to prevent it from becoming too large. However, adding new "news" entries causes the size of the div to expand and the border to be redrawn.
var dateCheck = function () {
switch (dString) {
case "January 1, 1992":
$('#newsDiv').append(dString + "<br>"//bunch of other code);
break;
case "January 2, 1992":
$('#newsDiv').append(dString + "<br>" //bunch of other code);
break;
case "January 3, 1992":
$('#newsDiv').append(dString + "<br>" //bunch of other code);
break;
case "January 4, 1992":
$('#newsDiv').append(dString + "<br>" //bunch of other code);
break;
}
};
fiddle