We are told by Herodotus that Cleisthenes of Sikyon had a daughter named Agariste, and, having won the chariot race in the Olympic Games, he sent out a proclamation telling all those who thought themselves fit to be a son-in-low to the great Cleisthenes to come by the sixtieth day to Sikyon. All the potential suitors of all the noble Hellenic families came. One of the Greeks from Athens, Hippocleides, the son of Tisander, was far and away the most promising suitor, being extremely wealthy and handsome and of good family. For an entire year Cleisthenes feasted them and tested them to see if they truly were worthy. When it came to the day the announcement of the victor was to be made, Hippocleides was, we would say, far in the lead, and throughout the feast that day he was the star of the show.
At one point, however, he decided he would dance to the flute, and he did, to his great enjoyment. Cleisthenes, it is said, looked a bit doubtful at it. But Hippocleides was enjoying himself, and had a table brought in, so that he could dance on the table. Which he did, dancing now in one style, now in another, until finally he stood on his head and began dancing that way, gesticulating his legs wildly. Up to that point, Cleisthenes was merely annoyed that Hippocleides would be his son-in-law; but, apparently, the sight of the young man dancing on his head was too much, and he exclaimed, "You have danced away your marriage, son of Tisander!" To which Hippocleides replied, "Hippocleides doesn't care!" This passed into a proverb; and (largely through the influence of Herodotus) it's still a saying indicating indifference even to something major.
Of course, to get the full force of the story you have to remember that standing on your head is a bit more shocking if you are wearing the garb of ancient Greece than if you are wearing the sort of thing we wear today. They, after all, did not have pants. And I am told that there's usually thought to be a pun in the story based on this since the word Cleisthenes uses for 'dance' has a verbal similarity to the word for 'testicle'.