What's the source of the expression/verb "cotton to" (eg "I don't cotton to that idea")

Michael Quinnon from World Wide Worlds has the authoritative answer. Cotton on
It’s complicated, but I’ll try to unravel it for you…