{"id":181802,"date":"2013-06-02T12:41:02","date_gmt":"2013-06-02T08:41:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=181802"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=181802","title":{"rendered":"<span class=\"post_title\">\u0412\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u0430-\u043b\u044f \u0425\u0430\u0431\u0440<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/6fc\/bdd\/060\/6fcbdd06022c07f284417f2b57e47ee5.png\" align=\"left\"\/> \u041c\u044b \u0432\u0438\u0434\u0438\u043c \u044d\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c: \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0434\u0432\u0438\u0436\u043e\u043a \u0425\u0430\u0431\u0440\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0435\u0442 \u043d\u0430\u0441 \u043e \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u0432\u0441\u0435\u0433\u043e 5 \u043c\u0438\u043d\u0443\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.<br \/>  <a name=\"habracut\"><\/a><br \/>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 CSS:<\/p>\n<pre><code class=\"css\">.errorBoxStyle {     display: none;      border: 1px solid #f7c7c9;      background: #f9e5e6;      position: fixed;     right: 20px;      top: 20px;      text-align: center;     width: 370px;      -webkit-box-shadow: 0px 5px 5px 3px rgba(0, 0, 0, 0.3);      box-shadow: 0px 5px 5px 3px rgba(0, 0, 0, 0.3);      -webkit-border-radius: 5px;      border-radius: 5px; }  .errorMessageStyle {     color: #c77c7e;      padding-top: 16px;      padding-bottom: 16px;     font-weight: bold;       text-shadow: 1px 1px 1px #FFFFFF;      filter: dropshadow(color=#FFFFFF, offx=1, offy=1); } <\/code><\/pre>\n<p>  \u0433\u0434\u0435 <code>errorBoxStyle<\/code> \u2014 \u044d\u0442\u043e \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0441\u0430\u043c\u043e\u0433\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u0430 <code>errorMessageBox<\/code> \u2014 \u043a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0442\u0435\u043a\u0441\u0442\u0430. \u041c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0432 \u043f\u0440\u0430\u0432\u043e\u043c \u0432\u0435\u0440\u0445\u043d\u0435\u043c \u0443\u0433\u043b\u0443, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 CSS \u043c\u044b \u043f\u0438\u0448\u0435\u043c <\/p>\n<p>  <code>position: fixed; right: 20px; top: 20px; <\/code><\/p>\n<p>  \u0414\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043c\u0435\u043d\u044f\u0442\u044c \u043f\u043e\u0437\u0438\u0446\u0438\u044e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u043b\u0435\u0432\u044b\u0439 \u043d\u0438\u0436\u043d\u0438\u0439 \u0443\u0433\u043e\u043b, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0442\u0430\u043a:<\/p>\n<p>  <code>position: fixed; left: 20px; bottom: 20px; <\/code><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438 \u0441\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0441 \u0437\u0430\u0434\u0430\u043d\u043d\u044b\u043c \u0442\u0435\u043a\u0441\u0442\u043e\u043c. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 jQuery <code>fadeIn<\/code> \u0438 <code>fadeOut<\/code>:<\/p>\n<pre><code class=\"javascript\">function throwMessage (str){     $(&quot;#errorMessageID&quot;).html(str);     $(&quot;#errorBoxID&quot;).fadeIn(500).delay(3000).fadeOut(500); } <\/code><\/pre>\n<p>  \u0421\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432 \u0442\u0435\u0447\u0435\u043d\u0438\u0438 \u0442\u0440\u0435\u0445 \u0441\u0435\u043a\u0443\u043d\u0434, \u0430 \u0437\u0430\u0442\u0435\u043c \u0438\u0441\u0447\u0435\u0437\u043d\u0435\u0442. \u0418 \u0441\u0430\u043c\u044b\u0439 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0439 \u0448\u0430\u0433: \u043e\u0444\u043e\u0440\u043c\u0438\u043c HTML-\u043a\u043e\u0434, \u0433\u0434\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448 <code>div<\/code> \u0434\u043b\u044f \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"html\">&lt;!-- \u042d\u0442\u043e\u0442 div \u043d\u0435 \u0432\u0438\u0434\u0435\u043d \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f, \u0442.\u043a. display: none; --&gt; &lt;div id=&quot;errorBoxID&quot; class=&quot;errorBoxStyle&quot;&gt;     &lt;p id=&quot;errorMessageID&quot; class=&quot;errorMessageStyle&quot;&gt;&lt;\/p&gt; &lt;\/div&gt;  &lt;a href=&quot;#&quot; onclick=&quot;throwMessage('\u0417\u0434\u0435\u0441\u044c \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0432\u0441\u0435, \u0447\u0442\u043e \u0443\u0433\u043e\u0434\u043d\u043e!'); return false;&quot;&gt;Click me!&lt;\/a&gt; <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0438 \u0432\u0441\u0451, \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \ud83d\ude42 \u041f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u0441\u0441\u044b\u043b\u043a\u0443 \u043c\u044b \u0443\u0432\u0438\u0434\u0438\u043c \u043d\u0430\u0448\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435. \u0421\u0430\u043c\u043e \u0441\u043e\u0431\u043e\u0439, \u044d\u0442\u0443 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u043d\u0430 \u043b\u044e\u0431\u043e\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043d\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 AJAX-\u0437\u0430\u043f\u0440\u043e\u0441\u0430:<\/p>\n<pre><code class=\"javascript\">$.ajax({     url: &quot;ajax.php&quot;,     type: &quot;POST&quot;,     data: &quot;id=&quot; + id_value,     cache: false,     success: function(data) {         throwMessage(data);     } }); <\/code><\/pre>\n<p>  \u0414\u0435\u043c\u043e \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c <a href=\"http:\/\/jsfiddle.net\/RedOctober\/quYhZ\/18\/\">\u0437\u0434\u0435\u0441\u044c<\/a>. \u042f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e \u044d\u0442\u043e\u0442 \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u043a\u0430\u0436\u0435\u0442\u0441\u044f \u043a\u043e\u043c\u0443-\u043d\u0438\u0431\u0443\u0434\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c.    \t<\/p>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/181802\/\"> http:\/\/habrahabr.ru\/post\/181802\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t<img decoding=\"async\" src=\"http:\/\/habrastorage.org\/storage2\/6fc\/bdd\/060\/6fcbdd06022c07f284417f2b57e47ee5.png\" align=\"left\"\/> \u041c\u044b \u0432\u0438\u0434\u0438\u043c \u044d\u0442\u0438 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0447\u0442\u0438 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c: \u0438\u043c\u0435\u043d\u043d\u043e \u0442\u0430\u043a \u0434\u0432\u0438\u0436\u043e\u043a \u0425\u0430\u0431\u0440\u0430 \u043e\u043f\u043e\u0432\u0435\u0449\u0430\u0435\u0442 \u043d\u0430\u0441 \u043e \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043e\u0448\u0438\u0431\u043a\u0430\u0445 \u0432 \u043d\u0430\u0448\u0438\u0445 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f\u0445 \u0438 \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u0445. \u042d\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0443\u0434\u043e\u0431\u043d\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435\u0439: \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u043d\u0435 \u043e\u0431\u0440\u0430\u0442\u0438\u0442\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0430 \u0442\u0430\u043a\u0438\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0421\u0435\u0433\u043e\u0434\u043d\u044f \u044f \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443 \u0432\u0430\u043c, \u043a\u0430\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0430\u0442\u0438\u0432 \u0432\u0441\u0435\u0433\u043e 5 \u043c\u0438\u043d\u0443\u0442 \u0441\u0432\u043e\u0435\u0433\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438.  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-181802","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/181802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=181802"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/181802\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=181802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=181802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=181802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}