World number two Novak Djokovic is through to the fourth round of Wimbledon, despite a strong fight from Cypriot Marcos Baghdatis.