Study of nuclear magnetic transitions by inelastic electron scattering