Shares of Vivusskyrocketed on Thursday after the U.S. Food and Drug Administration backed Qnexa, the drugmaker's diet pill. If passed, the drug would be the first obesity pill to get approved in 13 years.

This was a long-shot, Cramer said, but Vivus proved to be a very profitable for those who speculated on it. So we can we learn from Vivus’ huge gain? Cramer said it all comes down to looking for undervalued stocks that have potential to pop.