Excellent solution
Our cat would pry open sliding doors and sharpen her claws on our furniture. We drilled these magnets (N + S) into the ends of our sliding doors so they would snap together when shut. It still enabled our young grand children access whilst keeping the cat out. Works perfectly. Many thanks.