It has legs

There is a reasonably common phrase, "[something] has legs." I'm wondering if it means, figuratively, that something is strong, agile, or has endurance.

Does anyone know for sure which is meant? And, out of curiosity, what's the derivation.

Jonathon Green writes, in Cassell's Dictionary of Slang, "have legs [19C+] to be considered fast" and notes "media jargon _have legs_, of a TV programme, book etc, to be a potential success."

From _Mass Media Dictionary_ by R. Terry Ellmore:

legs A slang term for a motion picture or television program that has or will achieve strong audience acceptance or interest.