The win moved the Yorkshire side above Millwall, who were hammered 4-1 at Brighton and Hove Albion.
Brighton's top scorer Glenn Murray came off the bench to score two goals and set two up.
The striker Matt Fryatt fired a dramatic late double to end Leicester City's mini-slump with a 2-1 victory over Bristol Rovers.
The Foxes had been desperate to end a streak of four games without a win, but they were up against a buoyant Pirates side who had taken the lead through Jo Kuffour.
Oldham Athletic's unbeaten home record was left in tatters as Yeovil Town stunned them with a 2-0 win at Boundary Park.
A quickfire double from defender Aaron Brown and former Latics striker Paul Warne crowned the visitors' accomplished display against a home team who are showing inconsistent form - this defeat followed on from a 3-0 thrashing of Scunthorpe in midweek.
Kevin Gallen scored with his first touch to give MK Dons their third win in a row, as they beat Tranmere Rovers 1-0.
Carlisle United are now without a win in 12 games after a 3-0 reverse at Stockport County.
Stockport went in front on seven minutes. Carl Baker pounced on a loose ball before firing home low past Ben Alnwick. Stephen Gleeson made it two before Baker rounded off the scoring.
Former Hartlepool United striker Adam Boyd climbed off the substitutes bench to score the only goal of the game as Leyton Orient picked up their first win in ten league matches in a 1-0 success over his former club.
Two goals from Craig Mackail-Smith helped Peterborough United stretch their unbeaten legaue run to 11 games, although they failed to find the sparkle of recent outings and were given some anxious moments by lowly Hereford United in their 2-0 win.
Keigan Parker scored a sensational winner two minutes from time to earn a reprieve for under-pressure Huddersfield Town boss Stan Ternent.
The game against Crewe Alexandra was locked at 2-2 going into the final stages - with the former Iron defender Andy Butler on the scoresheet for the Terriers - before Parker struck. Wallsall were 3-1 victors over Northampton Town.
A dramatic injury-time goal secured Southend United a share of the spoils against Colchester United in the Essex derby, the day's early kick-off.
The Shrimpers threw away a 2-0 lead to allow the Us to take a 3-2 advantage into the closing stages, but Adam Barrett bundled the ball home three minutes into stoppage time to earn a point.