The invention provides, in one aspect, an animal feeder. The animal feeder includes a base and a sidewall extending upward from the base. The sidewall and base at least partially define an inner cavity operable to hold an animal feed. A roof, operable to transition between an open position and a closed position, is located above the sidewall. In the open position, the roof is magnetically attached to a first magnetic feature such that a user can access the inner cavity. In the closed position, the roof is magnetically attached to a second magnetic feature such that the user cannot access the inner cavity.