how to write this example?
$('.viewBookBtn').click(function() {
$(this).parent().parent().find('.hideable').toggle( // just the toggle function works fine
function(){
$(this).css('visibility', 'visible'); // but when defined it doesn't target the hideable classed element
},
function(){
$(this).css('visibility', 'hidden');
}
);
});