What about people, bllz? I have a question, I have a post system similar to facebook, and as you know, there is in the post for the user to open the settings to delete and etc, which when clicking it displays the div with the options, right, so far okay, I made the system to be able to apply the class 'block' in this div by clicking on the options icon ... The problem is, when the user clicks on the icon it displays, but it disappears only if the icon is pressed again, and I wanted him to disappear by clicking anywhere else, and like, I pressed one displayed, if I left open and pressed in the configuration of another publication, it would be visible both, and I wanted it to disappear when I pressed anywhere else and when I tried to do this with Blur (), but for some reason it did not work, it follows the code .js, remembering that I'm using JQuery: ::
//Código Js, função para exibir a div .configsOp e também esconder...
$('.configsPost .icon').on('click', function(){
$(this).parent().find('.configsOp').fadeToggle(200).toggleClass('block');
});
//Código que tentei usar para remover a Class Block da div.configsOp
$('.configsOp').blur(function(){
$(this).fadeToggle(200).removeClass('block');
});
Who knows, please help me.