The democrats have their opponents to thank for dubbing them the "donkey" party. In the election of 1828, presidential candidate (and democrat) Andrew Jackson was labeled a "jackass" for his populist beliefs and slogan,
"Let the people rule." Jackson
liked the insult so much he used it to his advantage on campaign posters.
But it is cartoonist Thomas Nast who is credited with making the donkey the recognized symbol of the Democratic Party. It first appeared in a cartoon in Harper's Weekly in 1870, and was supposed to represent an anti-Civil War faction. But the public was immediately taken by it and by 1880 it had already become the unofficial symbol of the party.
Nast was also responsible for creating the Republican Party elephant. In a cartoon that appeared in Harper's Weekly in 1874, Nast drew a donkey clothed in lion's skin, scaring away all the animals at the zoo. One of those animals, the elephant, was labeled "The Republican Vote." The rest is history.