I want to start by saying I've seen this topic: Attraction and repulsion of Magnetic materials and its supposed duplicates and it hasn't helped me very much.
In the book Introduction to Electrodynamics by Griffiths, it says the following: "In general, when a sample is placed in a region of nonuniform field, the paramagnet is attracted into the field, whereas the diamagnet is repelled away." (section 6.14, p.273, 4th ed.)
I don't understand why this should be true. The book states that the reasons for paramagnetism and diamagnetism are due to quantum mechanics, but the book seems to imply there is a classical reason as well.
The only thing I can think of is the equation that in a nonuniform magnetic field, $F=\nabla(m \cdot B)$. Now if the $B$ field is getting weaker if you continue in the direction the field is in at that point (and stronger if you go the reverse direction), then for a paramagnetic material, with $m$ lined up with $B$ the direction of $F=\nabla(m \cdot B)$ is into the field, and for a diamagnetic field, $F=\nabla(m \cdot B)$ is away from the field. But I don't see any reason why the $B$ field gets weaker as you continue along the direction of the $B$ field.
Any help would be very appreciated.