Jansen added 111 runs for the sixth wicket with Elgar, who finally fell for 185 after reaching stumped unbeaten on140 on Wednesday.
South Africa were 7-392 in 100 overs at lunch on day three.
India were bowled out for 245 on day two.
At the break, Kagiso Rabada (1 not out) was accompanying Jansen at the crease, with India staring down the barrel.
Resuming on 5-256, Elgar looked to drive home South Africa's advantage.
The key was seeing off Jasprit Bumrah and Mohammed Siraj in their opening spells, which Elgar and Jansen did with relative ease.
South African batsman Marco Jansen plays a legside shot on the third day of the Test against India. (AP PHOTO)
The duo added 67 runs in the first hour as the Indian pacers leaked runs with the sun coming out.
Elgar crossed the 150-run mark off 228 balls, adding 50 off 102 balls with Jansen.
The latter scored seven boundaries to reach his second Test half-century off 70 balls.
Their 100-run partnership came off 169 balls as South Africa's lead crossed 100 in the extended morning session.
India took the new ball when it became available, but there wasn't much coming from their pacers.
Ravichandran Ashwin was handed the new ball, surprisingly, but the fielders didn't back him up. There were two chances spilled off his bowling in the second hour's play.
The breakthrough finally came when Elgar gloved one down the leg side off Shardul Thakur in the 95th over.
Elgar faced 287 runs and hit 28 fours in his knock.