My airline will allow visitors to the cockpit before or after the flight, but before is a bad time since we are busy getting the flight ready. If you ask the Flight Attendant(s) they should be able to arrange it for you after landing, unless the crew is in a rush to catch a flight to go home.