Yahoo CEO Marissa Mayer gave shareholders what they wanted, but they didn't stay happy for long.

Shares of the embattled Internet company jumped by as much as 8 percent in after-hours trade Tuesday after it announced it would spin off its entire stake in China's Alibaba Group to shareholders. The move was applauded because it will save well over $10 billion in taxes that the company would have incurred through a traditional sale of the stake.