Needed this functionality for the inside of my pantry door.  One problem has been that the rubber caps on the ends that rest against the door tend to pop off.  Gluing them works!