H1b Stamping with old employer after transfer to new one

Hi,
I have a unique situation, My h1b visa is expired with current employer but have valid I797. I have a job offer with new employer and they want to do H1b transfer before I leave to India and after I come back join them.

Question is, can I go for stamping with old employer in India, come back on old employer H1b visa and I -797 and then join new employer after resigning the old employer?

Please advise

What do you mean by Visa and What do you mean by I-797 here?
Visa means the stamped document on your passport? It has nothing to do with once you are inside United States.
Expiration date on I-797 is not an indicator of its validity. You must maintain its terms and conditions(like working for that I-797 employer and getting paid etc) as long as you are on that employer sponsored visa status. If you fail to maintain it, regardless of the expiration date on I-797 validity date, you cant use such H1B visa.

Old employer means currently you are working for that employer? If so, you can use it for stamping if not, you cant.

yes I am working for old employer and would like to continue to do so until I come back to US But in the mean new employer wants to apply for H1b transfer, can I still get H1b visa stamped using old employer even though new employer has approved H1b( not joined him yet)

Sure, you can do that.