Correctly handle "toggle visibility" requests via Ajax