I'm trying to understand electromagnets and the relationship between magnetic field and current. Just thinking about a loosely wound coil, with an air core. Something on the wiki page "Electromagnet" has stumped me:
The leakage field lines between each turn of the coil exert a repulsive force between adjacent turns, tending to push them apart.
Ampere's Force Law states that wires with current travelling in the same direction attract one another. This should be the case in an electromagnet, as at any point around the circumference, adjacent wires have the same current travelling in the same direction. My understanding suggests that this would cause the coils to pull closer to each other, collapsing the gaps between the windings. However, this quote suggests otherwise.
What mechanism is at work to cause repulsion between adjacent turns, rather than attraction?