Page 93 in my 1853 copy of William Pulleyn’s The Etymological Compendium:
“The custom of keeping fools for the purpose of producing amusement, ascends, as we are assured by the learn Fosbroke, to the classical ages. In Britain they were retained at court till the reign of Charles II., and in noblemen’s families till perhaps a somewhat later day. Even the dignitaries of the Church in the middle ages kept fools to make them laugh—or to laugh at them.
Nay, the grave David I. of Scotland, who built so any churches and monasteries, had a jester.
The Lord Mayor of London also had his fool, one of whose regular jokes it was, at the great annual feast, to leap, clothes and all, into a huge custard– a jest which certainly could not be considered as deficient in cream, however monotonous it would be apt to become from repetition.
In those days, moreover, fools were often retained at taverns to keep the guests in good humour.”
More on the cartoon by Justin H. Howard:

Chicago Nominee: “I knew him, Horatio; a fellow of infinite jest…Where be your gibes now?–Hamlet, Act IV [sic], Scene 1″1864
“A contemporary of American cartoonist Thomas Nast, Justin H. Howard created this caricature of Union general George McClellan, the Democratic nominee in the 1864 presidential campaign, as Hamlet in the famous graveyard scene in act 5 of Shakespeare’s play.
Instead of the skull of court jester Yorick, McClellan addresses the head of President Abraham Lincoln, his Republican opponent. Governor Horatio Seymour of New York is cast as Hamlet’s friend Horatio, and the grave digger is a famished Irish immigrant.
In 1862 Lincoln removed General McClellan, who had been in command of the Union army, from active duty after he failed to achieve a decisive victory at Antietam—the bloodiest battle in American military history.
The caption at the bottom of the image alludes to false newspaper reports that Lincoln had acted with inappropriate levity while touring the Civil War battlefield at Antietam”.