{"id":204030,"date":"2013-11-28T20:20:04","date_gmt":"2013-11-28T16:20:04","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=204030"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=204030","title":{"rendered":"<span class=\"post_title\">\u041d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u044b<\/span>"},"content":{"rendered":"<div class=\"content html_format\">\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u044b \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c javascript-\u0435, \u0438 \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u043e\u043b\u0431\u0435\u043a\u0430\u043c\u0438 \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/81d\/286\/9c2\/81d2869c23ca131c25577bcf7d9ed96a.png\"\/><\/p>\n<h5><a href=\"http:\/\/jsfiddle.net\/domovoj\/9BPAf\/\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 jsfiddle<\/a><\/h5>\n<h5><a name=\"habracut\"><\/a><a href=\"https:\/\/github.com\/domovoj\/checkboxes\">\u0421\u043a\u0430\u0447\u0430\u0442\u044c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0438\u0437 github<\/a><\/h5>\n<h3>\u041a\u0430\u043a \u044d\u0442\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442<\/h3>\n<p>  <\/p>\n<h5>HTML:<\/h5>\n<pre><code class=\"html\">&lt;fieldset class=&quot;frame-checks-not-standart&quot;&gt;     &lt;label&gt;         &lt;span class=&quot;niceCheck b_n&quot;&gt;             &lt;input autofocus type=&quot;checkbox&quot; checked=&quot;checked&quot; tabindex=&quot;1&quot;\/&gt;         &lt;\/span&gt;         &lt;span class=&quot;title&quot;&gt;focus checked&lt;\/span&gt;     &lt;\/label&gt; &lt;\/fieldset&gt; <\/code><\/pre>\n<p>  <\/p>\n<h5>CSS:<\/h5>\n<p>\u041a\u043b\u0430\u0441\u0441 <code>b_n<\/code> \u0432 \u0441\u0442\u0438\u043b\u044f\u0445 \u0434\u043e\u043b\u0436\u0435\u043d \u0438\u043c\u0435\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u043e<code> background-image:none<\/code> \u0434\u043b\u044f \u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c javascript-\u0435 \u0441\u0431\u0435\u0440\u0435\u0447\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u044b.<\/p>\n<h5>JS:<\/h5>\n<pre><code class=\"javascript\">$(\u2018.frame-labels\u2019).nStCheck(); <\/code><\/pre>\n<h3>\u0427\u0442\u043e \u0435\u0449\u0435 <b>\u043c\u043e\u0436\u043d\u043e <\/b> \u0437\u043d\u0430\u0442\u044c<\/h3>\n<p>  <\/p>\n<ol>\n<li>\n<h5>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b<\/h5>\n<p>\u0412\u0441\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438\u043c\u0435\u044e\u0442 \u0434\u0435\u0444\u043e\u043b\u0442\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435.<\/p>\n<ul>\n<li>\n<h6><code>wrapper <\/code>(jQuery \u043e\u0431\u044a\u0435\u043a\u0442)<\/h6>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442-\u043e\u0431\u0435\u0440\u0442\u043a\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u043c\u0443 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u043f\u0435\u0440\u0435\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u0430;<\/p>\n<\/li>\n<li>\n<h6><code>elCheckWrap <\/code>(jQuery \u0441\u0435\u043b\u0435\u043a\u0442\u043e\u0440)<\/h6>\n<p>\u042d\u043b\u0435\u043c\u0435\u043d\u0442-\u043e\u0431\u0435\u0440\u0442\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0438 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u0430;<\/p>\n<\/li>\n<li>\n<h6><code>classRemove<\/code><\/h6>\n<p>\u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u043a\u043b\u0430\u0441\u0441\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0434\u043e \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0443 <code>$(elCheckWrap) <\/code>(\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u0438\u043b\u0438 \u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432).<\/p>\n<\/li>\n<li>\n<h6><code>evCond <\/code>(\u0431\u0443\u043b\u0435\u0432\u044b\u0439 \u0442\u0438\u043f)<\/h6>\n<p>\u042d\u0441\u043b\u0438 <code>true <\/code>\u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 <code>trigger<\/code>, \u0438\u043d\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u043d \u043c\u0435\u0442\u043e\u0434 <code>after<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>trigger <\/code>(\u043c\u0435\u0442\u043e\u0434)<\/h6>\n<p>\u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0447\u0435\u0442\u044b\u0440\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430:  <\/p>\n<ul>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0437\u0432\u0430\u043d \u043f\u043b\u0430\u0433\u0438\u043d;<\/li>\n<li><code>wrapper<\/code>;<\/li>\n<li><code>elCheckWrap<\/code>;<\/li>\n<li>\u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f (\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u044f).<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\n<h6><code>after<\/code> (\u043c\u0435\u0442\u043e\u0434)<\/h6>\n<p>\u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442 \u0442\u0435 \u0436\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u0447\u0442\u043e \u0438 <code>trigger<\/code>. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f, \u0442\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u0430 \u043d\u0435 \u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f, \u0435\u0433\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (\u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e, \u043a \u043f\u0440\u0438\u043c\u0435\u0440\u0443, \u0435\u0441\u043b\u0438 \u043c\u044b \u0436\u0434\u0435\u043c \u043e\u0442\u0432\u0435\u0442 \u043e\u0442 \u0441\u0435\u0440\u0432\u0435\u0440\u0430);<\/p>\n<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\n<h5>\u041c\u0435\u0442\u043e\u0434\u044b<\/h5>\n<p>\u0412\u0441\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u044e\u0442 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <code>$(elCheckWrap)<\/code> \u2014 \u0435\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u0432\u0430\u043d \u043a\u0430\u043a \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0415\u0441\u043b\u0438 \u043c\u0435\u0442\u043e\u0434 \u0432\u044b\u0437\u0432\u0430\u043d \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 <code>$(elCheckWrap)<\/code>, \u0442\u043e \u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u043f\u0435\u0440\u0430\u0442\u043e\u0440\u0430 <code>this<\/code>.<br \/>  \u041d\u0430\u043f\u043e\u043c\u043d\u044e \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u044b\u0437\u043e\u0432\u0430 \u043c\u0435\u0442\u043e\u0434\u0430:  <\/p>\n<pre><code class=\"javascript\">$(\u2018.niceCheck\u2019).drop(\u2018changeCheck\u2019) <\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u044d\u0442\u043e\u0433\u043e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 \u043c\u043e\u0436\u043d\u043e \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"javascript\">$.drop(\u2018changeCheck\u2019)($(\u2018.niceCheck\u2019)) <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\n<h6><code>_changeCheckStart<\/code><\/h6>\n<p>\u041c\u0435\u0442\u043e\u0434 \u0437\u0430\u0434\u0430\u0435\u0442 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435 (\u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u0438 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043b\u0430\u0433\u0438\u043d\u0430);<\/p>\n<\/li>\n<li>\n<h6><code>checkChecked<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>checked<\/code>, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>active <\/code>\u0434\u043b\u044f wrapper \u0438 <code>$(elCheckWrap)<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>checkUnChecked<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>checked<\/code>, \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>active <\/code>\u0434\u043b\u044f <code>wrapper <\/code>\u0438 <code>$(elCheckWrap)<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>changeCheck<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>checked<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435, \u0438 \u043d\u0430\u043e\u0431\u043e\u0440\u043e\u0442 (\u0441\u0432\u043e\u0435\u0433\u043e \u0440\u043e\u0434\u0430 toogle);<\/p>\n<\/li>\n<li>\n<h6><code>checkAllChecks<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>checked <\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<h6><code>checkAllReset<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>checked <\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432;<\/p>\n<\/li>\n<li>\n<h6><code>checkAllDisabled<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>disabled <\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 disabled \u043a wrapper \u0438 $(elCheckWrap);<\/p>\n<\/li>\n<li>\n<h6><code>checkAllEnabled<\/code><\/h6>\n<p>\u0417\u0430\u0434\u0430\u0435\u0442 \u043e\u0442\u0440\u0438\u0446\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>disabled <\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431\u044a\u0435\u043a\u0442\u043e\u0432, \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>disabled <\/code>\u0434\u043b\u044f wrapper \u0438 <code>$(elCheckWrap)<\/code>;<\/p>\n<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\n<h5>\u0421\u043e\u0431\u044b\u0442\u0438\u044f<\/h5>\n<p>\u041d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0441 <b>namespace<\/b>-\u043e\u043c (<i>nstcheck<\/i>)  <\/p>\n<ul>\n<li>\n<h6><code>reset <\/code>(<i>form<\/i>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>checkAllReset <\/code>\u0434\u043b\u044f \u0432\u0441\u0435\u0445 \u043f\u0440\u0435\u0436\u0434\u0435 \u043d\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u044b\u0445 \u0438 <code>checkAllChecks <\/code>\u0434\u043b\u044f \u043f\u0440\u0435\u0436\u0434\u0435 \u0432\u044b\u0431\u0440\u0430\u043d\u044b\u0445;<\/p>\n<\/li>\n<li>\n<h6><code>mousedown <\/code>(<i>input<\/i>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<h6><code>click <\/code>(<i>input<\/i>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0443\u0435\u0442 \u043c\u0435\u0442\u043e\u0434 <code>stopPropagation()<\/code> \u043a \u043e\u0431\u044a\u0435\u043a\u0442\u0443 \u0441\u043e\u0431\u044b\u0442\u0438\u044f;<\/p>\n<\/li>\n<li>\n<h6><code>keyup <\/code>(<i>input<\/i>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043f\u0440\u0438 \u043d\u0430\u0436\u0430\u0442\u0438\u0438 \u043a\u043b\u0430\u0432\u0438\u0448\u0438 \u00ab\u043f\u0440\u043e\u0431\u0435\u043b\u00bb \u0438 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<h6><code>focus <\/code>(<i>input<\/i>)<\/h6>\n<p> \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>focus<\/code> \u0434\u043b\u044f <code>$(elCheckWrap)<\/code> \u0438 <code>wrapper<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>blur <\/code>(<i>input<\/i>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0443\u0431\u0438\u0440\u0430\u0435\u0442 \u043a\u043b\u0430\u0441\u0441 <code>focus <\/code>\u0434\u043b\u044f <code>$(elCheckWrap)<\/code> \u0438 <code>wrapper<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>change <\/code>(<i>input<\/i>)<\/h6>\n<p> \u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0442\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043f\u043e\u0432\u0435\u0434\u0435\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<h6><code>click <\/code> (<code>wrapper<\/code>)<\/h6>\n<p>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u201c\u043f\u043e\u0432\u0435\u0448\u0435\u043d\u201d \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 wrapper (\u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435).<\/p>\n<\/li>\n<\/ul>\n<p>  <\/li>\n<li>\n<h5>\u041a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f<\/h5>\n<p>\u041d\u0430\u0432\u0435\u0448\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u0441\u0435\u0445 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0445 \u0441\u043e\u0431\u044b\u0442\u0438\u0439 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 <b>namespace<\/b>-\u043e\u043c (<i>nstcheck<\/i>)<\/p>\n<p>  \u0412\u0441\u0435 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u0437\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u044e\u0442 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043e\u0434\u043d\u043e \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e:<br \/>  <b>el<\/b> (<i>$(elCheckWrap)<\/i>);<\/p>\n<p>  \u042d\u0442\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0432\u0435\u0441\u0438\u0442\u044c \u043d\u0430 \u043a\u0430\u043a\u043e\u0439-\u043d\u0438\u0431\u0443\u0434\u044c <code>input<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0432 \u044d\u0442\u043e\u043c \u043f\u043b\u0430\u0433\u0438\u043d\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a:  <\/p>\n<pre><code class=\"javascript\">$('input').on('nstcheck.cc', function(e){      console.log(this); \/\/ $('input') - \u043e\u0431\u044a\u0435\u043a\u0442, \u0432 \u043a\u043e\u043d\u0442\u0435\u043a\u0441\u0442\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \/\/\u0441\u043e\u0431\u044b\u0442\u0438\u0435      console.log(e.el); \/\/ \u0432\u044b\u0432\u0435\u0434\u0435\u0442 $(elCheckWrap) }); <\/code><\/pre>\n<p>  <\/p>\n<ul>\n<li>\n<h6><code>nstcheck.cc<\/code><\/h6>\n<p>\u041d\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>checkChecked<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>nstcheck.cuc<\/code><\/h6>\n<p>\u041d\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>checkUnChecked<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>nstcheck.ad<\/code><\/h6>\n<p>\u041d\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>checkAllDisabled<\/code>;<\/p>\n<\/li>\n<li>\n<h6><code>nstcheck.ae<\/code><\/h6>\n<p>\u041d\u0430\u0441\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 \u0432\u044b\u0437\u043e\u0432\u0435 \u043c\u0435\u0442\u043e\u0434\u0430 <code>checkAllEnabled<\/code>.  <\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>  \u041f\u043b\u0430\u0433\u0438\u043d \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u043f\u043e\u043b\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445 \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u043e\u0432, \u0438\u043c\u0435\u0435\u0442 \u043a\u043e\u043c\u043f\u0430\u043a\u0442\u043d\u0443\u044e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <b>HTML <\/b> \u2014 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u043e \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0438 \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043e\u0439 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u043d\u0430\u0431\u0436\u0435\u043d \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438 \u0438 \u043a\u043e\u043b\u0431\u0435\u043a\u0430\u043c\u0438. \u041c\u043e\u0436\u043d\u043e \u0441\u0442\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0435\u0441\u0442\u044c \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u0440\u0438 <b>Tab <\/b>\u043e\u0431\u0445\u043e\u0434\u0435, \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0430\u044f \u043a\u043d\u043e\u043f\u043a\u0430 <b>reset<\/b>.    \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\/company\/imagecms\/blog\/204030\/\"> http:\/\/habrahabr.ru\/company\/imagecms\/blog\/204030\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">\n<h2>\u0417\u0430\u0434\u0430\u0447\u0430<\/h2>\n<p>  \u041f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u0442\u0438\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0447\u0435\u043a\u0431\u043e\u043a\u0441\u044b \u0441 \u043f\u043e\u043b\u043d\u044b\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u043e\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0445, \u0441 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u043f\u0440\u0438 \u0432\u044b\u043a\u043b\u044e\u0447\u0435\u043d\u043d\u043e\u043c javascript-\u0435, \u0438 \u0432\u043e\u043e\u0440\u0443\u0436\u0438\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c\u0438 \u043a\u043e\u043b\u0431\u0435\u043a\u0430\u043c\u0438 \u0438 \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u044b\u043c\u0438 \u0441\u043e\u0431\u044b\u0442\u0438\u044f\u043c\u0438.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/81d\/286\/9c2\/81d2869c23ca131c25577bcf7d9ed96a.png\"\/><\/p>\n<h5><a href=\"http:\/\/jsfiddle.net\/domovoj\/9BPAf\/\">\u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440 \u043d\u0430 jsfiddle<\/a><\/h5>\n<h5>\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-204030","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204030","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=204030"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/204030\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=204030"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=204030"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=204030"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}