Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
I have placed the spring from the inside of a retractable biro over each end of my iPad, iPhone, iPod, EarPods and MacBooks' cables as a way to avoid your type of dilemma.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.