<button class ="btn btn-default pull-right" id="save" onclick="echoq();">Сохранить</button> <div id="resultVK" class="alert alert-success alert-dismissable col-md-6 pull-right" style="display:none;"> <button class="close" id="close" onclick="close();">×</button> Текст </div> Functions:
function echoq(){ $( "#resultVK" ).removeAttr( "style" ); } function close(){ $( "#resultVK" ).attr("style","display:none"); } Those. when you click save, show the block. When you press x - hide. But for some reason, hiding does not work.