You can make them as one, using the toggle plus , you do not need to specify an argument inputwhen choosing by identifier, jQuery returns only the first matched element on the ID (because there should be only one):
$('#showapple, #hideapple').click(function(){
$("div[title='apple'] > div").toggle(2000);
});