without knowing anything about the other functions on your page or the html, I'll guess that you just need to remove "hidePageContent();" so it doesnt hide the contentpage?
Code:
$bf_menu_items.bind('click', function(e) {
e.preventDefault();
var $itemContent = $(this).data('content');
if($itemContent === 'visit') {
BGMap.showMap();
} else {
$.when( BGImageController.fadeBG(true) ).done(function(){
BGMap.hideMap();
});
$itemContent.show();
}
});
I refined your code as well as removed hidecontentpage
- you are using jQuery alreayd so i remove the return false in favor of e.preventDefault()
- you were never really using $item for anything so I did things a little differently.