Effect of inertia and elasticity on stick-slip motion.