I'm starting in jQuery and I created a script in which when I click the div it displays the content. So far so good, but when you click on text close the jquery hide is not working.
jQuery(function(){
//jQuery('#showall').click(function(){
// jQuery('.targetDiv').show();
//});
jQuery('.showSingle').click(function(){
jQuery('.targetDiv').hide();
jQuery('#div'+$(this).attr('target')).show(500).fadeIn();
//Query('.fechar').hide(500).fadeIn();
});
jQuery('.fechar').click(function(){
jQuery('#div'+$(this).attr('target')).hide(500);
});
//$('.fechar').click(function(){
// $(".targetDiv").slideToggle();
// });
});
The script in JSFinddle