The leapfrogging of coaxial vortex rings is a famous effect which has been noticed since the times of Helmholtz. Recent advances in ultra-cold atomic gases show that the effect can now be studied in quantum fluids. The strong confinement which characterizes these systems motivates the study of leapfrogging of vortices within narrow channels. Using the two-dimensional point vortex model, we show that in the constrained geometry of a two-dimensional channel the dynamics is richer than in an unbounded domain: alongsize the known regimes of standard leapfrogging and the absence of it, we identify new regimes of backward leapfrogging and periodic orbits. Moreover, by solving the Gross-Pitaevskii equation for a Bose-Einstein condensate, we show that all four regimes exist for quantum vortices too. Finally, we discuss the differences between classical and quantum vortex leapfrogging which appear when the quantum healing length becomes significant compared to the vortex separation or the channel size, and when, due to high velocity, compressibility effects in the condensate becomes significant.