There have been numerous famous, and sometimes humorous, lampoons and mockery of philosophers throughout the ages. This can be attributed to the fact that philosophers, in their attempts to construct systematic rational accounts of the world and our place in it, sometimes end up saying things that appear contrary to common sense. In addition, philosophers are often quite earnest in their efforts at very abstruse and abstract theorizing--their truth-seeking concerns are deeply divorced from the concerns of daily life, and so it is easy to make fun of philosophers who have their "heads in the clouds."
Indeed, the latter phrase may have originated in the lampooning of the first great Western philosopher, Socrates, in Aristophanes' comic play The Clouds. Socrates is made to appear to be the buffoonish master of a school, "The Thinkery," concerned with laughable trivia as well as with "celestial phenomena." To do cosmological research, he is made to ascend in a basket to "the clouds."
The jokes may have been funny to Athenians, but Socrates is hardly recognizable in them. There is no evidence that the real Socrates was concerned with cosmology; the early dialogues of Plato, which are usually held to be heavily influenced by Socrates himself, as well as Xenophon's account of Socrates, show concern mainly with plumbing the nature of the moral virtues. Socrates himself later decried his treatment by Aristophanes, and himself lambasted by his accusers in the Apology.
Earnest and especially abstract truth-seekers are routinely mocked by their less thoughtful compatriots--something that continues to this day in the form of anti-intellectualism. Perhaps Socrates was not very far from the nerd or geek who is mocked in high school. This may not be due to the principled anti-intellectualism of the religious fideist (who says that blind faith is needed to know God) so much as envy and the resentment it engenders.
But sometimes it is not anti-intellectualism but instead the ridiculousness of particular theses that inspires ridicule. The philosopher and mathematician Leibniz was lampooned as Dr. Pangloss in another comic play, Candide, by his fellow philosopher Voltaire--himself no anti-intellectual. Voltaire thought that Leibniz's solution to the problem of evil, that this is the best of all possible worlds, was laughable, and set up Dr. Pangloss as a ridiculous figure who eventually dies in a pathetic state.
The Irish idealist, Berkeley, is perhaps the figure most often mocked by students of philosophy, because he holds that the physical world simply does not exist--all that exists are minds and ideas. This idealism of Berkeley's was mocked in Boswell's Johnson, when Samuel Johnson, again no anti-intellectual, kicked a stone and said, "I refute it [Berkeley's idealism] thus."
Johnson was followed in his mockery by Thomas Reid and a host of figures from the Scottish school of common sense. Reid actually gave a rare philosophical justification of lampooning philosophers who reject common sense. In his magnum opus, Essays on the Intellectual Powers of Man, Reid actually posits, as one of the earmarks of common sense, that it is appropriate to make fun of anything contrary to common sense. One of Reid's followers, James Beattie, as it were took Reid's advice and made something of a career out of mocking some of the uncommonsensical philosophers who preceded him, especially David Hume. For his part, Hume dismissed Beattie as a "silly, bigoted fellow," although this is perhaps less mockery than simple insult or contempt.
In the nineteenth century, Søren Kierkegaard was parodied in The Corsair, a weekly satirical magazine, which made fun of his appearance and dress, showing him having one trouser leg shorter than the other.