Happiness sells — at least on social media.

The classic rule of news used to be "if it bleeds, it leads," suggesting that people only want to hear stories about tragedy. War, death, disaster: These are the stories that have always lead the major media news programs. But now that news is in the hands of every person with a smartphone or a computer, researchers have found that there are different rules about what people actually want to read, watch and share.

PHOTOS TO AMAZE: 8 breathtaking garden mazes

In the past, news outlets simply wanted to get people to watch their shows or buy their paper. Shocking stories made people tune in. But now, people get their news from various sources. A one-off click is less valuable than a story that people actually want to share with their social media networks. And fortunately, happiness spreads more quickly than tragedy.

In a new study from the University of Pennsylvania, researchers tracked the online reach of about 7,000 articles from The New York Times over a three-month period. They found that the stories that focused on good news had more clicks and shares than negative stories.

Even better, researchers at Tübingen University in Germany found that when our social media connections read these happy stories, they in turn become happier — by about 64 percent — and thus more likely to also share happy stories. Happiness, as it turns out, is contagious.

The flip side of this research is that negative stories are also contagious. When people read negative posts or stories shared by their friends, they are more likely to also share negative posts.

But fortunately, according to the University of Penn study, people prefer good news to bad. The happier and more positive an article was, the more likely it was to be shared.

So, if you want to make the world a better place, go ahead and watch the pet rescue or giggling baby video that comes across your feed. And then brighten up the world by sharing it with your friends.