If a favorite tie or dress goes out of style, hold onto it, the saying goes. Eventually the fashion will come back. And so it appears with the Democratic Party, which only two years ago was wringing its hands over a disastrous loss of both the White House and the Senate. Democratic ideas, many of which dated from the New Deal, suddenly looked dowdy.
But already Democrats have pulled their old ideas out of the closet again. The party made a comeback during last fall's election with its most traditional themes, social security and jobs. Now it's claiming a victory in persuading President Reagan, the man who trounced them in 1980, to back a federal jobs bill that has a decidedly Democratic look.
In more than a dozen interviews with House and Senate members and officials of two ''think tanks'' formed to revitalize the party, Democrats conveyed a new mood of self-confidence.
At President Reagan's midterm, many Democrats on Capitol Hill are still reexamining their party's basic tenets and trying to devise new solutions to the nation's economic problems. But for others, the past two years of recession have served mainly to prove that Democrats were right in the first place.
''In 1981 the feeling was one of despair, a feeling that we really had to change everything around,'' says Rep. James M. Shannon of Massachusetts. ''That's past.''
The ''search for new ideas'' in the party has been oversold, he adds. ''It's been approached as if it's a treasure hunt where you say, 'Eureka! Here it is.' That's not going to happen.''
''We wasted an awful lot of time waiting for lightning to strike,'' says Sen. Christopher J. Dodd of Connecticut of the idea search. He argues that Democratic ideas are more successful today, but not because Democrats have changed. ''The hard facts of life have settled in at the White House,'' he says. ''So Democratic ideas are beginning to emerge, draped in Reagan rhetoric.''
The freshman Connecticut senator sees one benefit from the two years of questioning the party's values. ''Maybe if we hadn't gone through that, maybe we would not have come to realize that some of those principles are good.'' he says. ''Finally we realize that government must play a role in the economic life and social fabric of the nation.''
But the experience of the last two years has not left Democrats where it found them. An effort to redefine the party is still under way. ''It has started to catch on,'' says a Democratic staffer. ''It's not going to dominate the party in the next two years. But it's where the party is going.''
The new direction is away from the ''politics of redistribution'' of the wealth, established by President Lyndon B. Johnson's Great Society, and toward investment in economic growth and opportunity, says the staffer. He echoes a sizeable minority on Capitol Hill.
That movement will soon be overshadowed by Democratic candidates for president, who will be dominating the political arena by next summer. But it will have some effect even in presidential politics, since one candidate, Colorado Sen. Gary Hart, has been among the congressional Democrats seeking a new direction for the party.
''There's a new agenda for Democrats,'' holds Ted Van Dyk, president of the Center for National Policy, one of the think tanks set up in 1981 to invigorate the party. He lists as top priority control of the federal government benefits, including social security, as well as ''stable'' military growth, a tax policy ''that stimulates growth and investment'' in the private sector, and better government-labor-business cooperation.
As an adviser to Vice-President Hubert H. Humphrey, Mr. Van Dyk witnessed the birth of the Great Society, which once dominated the Democratic agenda. ''It used to be based on an ever-growing American pie, LBJ's 'endless cornucopia,' '' he says. ''All you had to do is have a good idea and there would be enough money to pay for it.''
''LBJ candidly told us, 'We'll make small beginnings, but nobody will ever turn these (federal benefit programs) back,' '' recalls Van Dyk.
''We found we made too many bargains with interest groups,'' he says. Now that the cornucopia has been depleted, he suggests that Democrats want to control the growth of entitlements, such as social security and medical payments , which go to the middle- and upper-income persons as well as to the poor.
''I think there is a consensus,'' he says. ''It takes the Democrats to address entitlements, as it took Nixon to go to China.''
Summing up the past decade of party differences, Rep. Paul Simon of Illinois, author of ''The Once and Future Democrats,'' concedes the need for change. ''There was a tendency for Republicans to say, 'We've got to work on making the pie bigger.' And for Democrats to say, 'We've got to distribute the pieces of pie equitably.' ''
''The Republicans forgot the equitable side,'' he says, so that even though General Motors Corporation won tax incentives, the company didn't expand, because ''if there's no demand for cars, GM doesn't do that.''
As for the Democrats, ''We have paid a great deal of attention to equity, but we forgot that if you don't talk about making the pie bigger, ultimately nobody is going to have piece of that pie.''
One of the chief proponents of making the economic ''pie'' grow, Rep. Timothy E. Wirth of Colorado, maintains he sees a ''fundamental change among new (Democratic) members'' of Congress. Mr. Wirth, a leader of the group nicknamed the ''Atari Democrats'' (after the manufacturer of computer games), is trying to push the party to look ahead and develop new industry with new technologies.
The Colorado lawmaker led a task force on economic policy for the Democratic caucus in the House that issued a set of proposals last year for long-term economic reforms.
With continuing high employment, Wirth concedes, the focus is now on the immediate problems. ''When you're in the midst of a very deep recession, what do you do?'' he says. ''You focus on the people who are hungry, who are running out of employment benefits, or whose health-care benefits are gone. That's just fundamentally Democratic that those things have to be done.''
But Wirth moves quickly to the long-range view. ''On the second level, we've got to grow ourselves out of unemployment.'' He cites the need for new jobs for young workers entering the market, adding, ''In the meantime, we need to try and get focused on retraining for displaced workers, recognizing first that great numbers of them are just not going to go back to their jobs.''
He sees hope in new technologies, which he says go beyond electronics to include better ways to burn coal, new ways to make ceramics, and biotechnology.
''Even in a time of recession . . . there are investments we have to make for ourselves and the future of our country,'' he says. ''We can't sit still.'' He says he hopes to convince the House Budget Committee, of which he is a member, to add federal money for research, for equipment for university laboratories, and for paying more to develop science, math, and engineering university faculty.
Such ideas have brought some criticism, especially from labor unions. ''There's a tension between the pro-efficiency and (pro-) productivity'' Democrats and those who are ''pro-equity,'' says Rep. Barney Frank of Massachusetts. Several Democrats say they worry that the new ''efficiency'' Democrats might be ignoring the traditional allies of the party in urban centers , including the elderly, minorities, and labor.
''People are always threatened by change,'' says Wirth, although he concedes, ''We may be a little too far out front.''
''I think what Tim (Wirth) is trying to do is provide some intellectual direction,'' says Rep. Vic Fazio of California, a new Democrat on the House Budget Committee. ''In the long run, we're going to have to have new industry. We have to give the country hope that we have alternatives to providing for these people with public funds.''
Newly elected Democrat Sen. Frank Lautenberg of New Jersey goes even further. ''Unless there is some kind of new initiative, Democrats run the risk of not being able to capture the roses in '84 because there are obvious signs of recovery,'' he says. ''So unless there are some new ideas and new initiatives, it's possible there will be a change in sentiment (in favor of) the President.''
A self-made millionaire and son of immigrant parents, Senator Lautenberg built up a huge computer business before going into politics. He has been arguing for years that Democrats need more of a business perspective.
Despite his electronics background, he says he disagrees that ''high technology is the salvation for all of our economic sins.'' His argument is that no matter what the industry, ''Unless you have a profitable business environment , we're not going to have the jobs.''
Sen. Max Baucus of Montana sounds a similar theme. ''Democrats realize that if we're going to solve our economic difficulties, we can't go back to the Great Society approach,'' he says, noting that members of his party are spending ''more time listening to the problems of businessmen.''
One of those listeners, Sen. George J. Mitchell of Maine, says he has been visiting manufacturers in his state who tell him low demand for products keeps them from growing. ''I think our plans should be growth-oriented,'' he says.
So far, there are many proposals, but no actual Democratic plan, and some say there never will be, at least until the party is united under a Democratic president. But after the rethinking of the past two years, Sen. David Pryor of Arkansas says the party has emerged ''tougher, leaner,'' and more ''fiscally responsible.''
''It made us assess ourselves so that we do not repeat our past mistakes,'' he says.