{"id":211538,"date":"2014-02-05T18:14:03","date_gmt":"2014-02-05T14:14:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=211538"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=211538","title":{"rendered":"<span class=\"post_title\">10+ \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0445 jQuery \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u043e\u0432 \u043d\u0430 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c<\/span>"},"content":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d6c\/877\/8ef\/d6c8778ef80f45ef0493af817ced5d0f.png\"\/><\/p>\n<p>  \u0421\u043f\u0443\u0441\u0442\u044f \u0433\u043e\u0434\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 jQuery \u0441\u0442\u0430\u043b\u0430 \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e web-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u0412\u0435\u0434\u044c \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u0435\u0441\u044f\u0442\u0438 \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0418\u0445 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0443\u0436\u0434\u044b \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<br \/>  <a name=\"habracut\"><\/a><\/p>\n<h4>\u041f\u043b\u0430\u0432\u043d\u044b\u0439 \u0441\u043a\u0440\u043e\u043b\u043b \u043a \u0432\u0435\u0440\u0445\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>  \u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0447\u043d\u0435\u043c \u044d\u0442\u043e\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0441 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u043e\u0433\u043e \u0438 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0433\u043e \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0430: \u044d\u0442\u0438 4 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0442 \u0432\u0430\u0448\u0438\u043c \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044f\u043c \u043f\u043b\u0430\u0432\u043d\u043e \u043f\u0440\u043e\u0441\u043a\u0440\u043e\u043b\u0438\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u043a \u0432\u0435\u0440\u0445\u0443 \u043f\u0440\u043e\u0441\u0442\u044b\u043c \u043d\u0430\u0436\u0430\u0442\u0438\u0435\u043c \u0441\u0441\u044b\u043b\u043a\u0438 (\u0441 id #top) \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u0432\u043d\u0438\u0437\u0443 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b.<\/p>\n<pre><code class=\"javascript\">$(&quot;a[href='#top']&quot;).click(function() {   $(&quot;html, body&quot;).animate({ scrollTop: 0 }, &quot;slow&quot;);   return false; }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/stackoverflow.com\/questions\/1144805\/how-do-i-scroll-to-the-top-of-the-page-with-jquery\/1145297#1145297\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0414\u0443\u0431\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 thead \u0432 \u0441\u0430\u043c\u044b\u0439 \u043d\u0438\u0437 html \u0442\u0430\u0431\u043b\u0438\u0446\u044b<\/h4>\n<p>  \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u0438 \u0442\u0430\u0431\u043b\u0438\u0446 \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u0441\u043a\u043e\u043f\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0448\u0430\u043f\u043a\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0432 \u043d\u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b. \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0441\u043d\u0438\u043f\u043f\u0435\u0442.<\/p>\n<pre><code class=\"javascript\">var $tfoot = $('&lt;tfoot&gt;&lt;\/tfoot&gt;'); $($('thead').clone(true, true).children().get().reverse()).each(function() {   $tfoot.append($(this)); }); $tfoot.insertAfter('table thead'); <\/code><\/pre>\n<p>  <a href=\"http:\/\/lunart.com.ua\/jquery\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a> <\/p>\n<h4>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0432\u043d\u0435\u0448\u043d\u0435\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430<\/h4>\n<p>  \u0412\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0439 \u0432\u043d\u0435\u0448\u043d\u0438\u0439 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0432 div? \u0422\u0430\u043a \u0432\u043e\u0442 \u044d\u0442\u043e \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0441 jQuery, \u043a\u0430\u043a \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043e \u0432 \u043d\u0438\u0436\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435.<\/p>\n<pre><code class=\"javascript\">$(&quot;#content&quot;).load(&quot;somefile.html&quot;, function(response, status, xhr) {   \/\/ error handling   if(status == &quot;error&quot;) {     $(&quot;#content&quot;).html(&quot;An error occured: &quot; + xhr.status + &quot; &quot; + xhr.statusText);   } }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/api.jquery.com\/load\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u041a\u043e\u043b\u043e\u043d\u043a\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u043e\u0439 \u0432\u044b\u0441\u043e\u0442\u044b<\/h4>\n<p>  \u0412 \u0441\u043b\u0443\u0447\u0430\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043b\u0443\u0447\u0448\u0435, \u0435\u0441\u043b\u0438 \u0443 \u043a\u043e\u043b\u043e\u043d\u043e\u043a \u0431\u0443\u0434\u0435\u0442 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0432\u044b\u0441\u043e\u0442\u0430. \u041a\u043e\u0434 \u043d\u0438\u0436\u0435 \u0432\u043e\u0437\u044c\u043c\u0435\u0442 \u0432\u0441\u0435 div \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b \u0441 \u043a\u043b\u0430\u0441\u0441\u043e\u043c .col \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u0438\u0445 \u0432\u044b\u0441\u043e\u0442\u0443 \u043f\u043e \u0441\u0430\u043c\u043e\u043c\u0443 \u0432\u044b\u0441\u043e\u043a\u043e\u043c\u0443 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0443. \u0421\u0443\u043f\u0435\u0440 \u043f\u043e\u043b\u0435\u0437\u043d\u043e!<\/p>\n<pre><code class=\"javascript\">var maxheight = 0; $(&quot;div.col&quot;).each(function() {   if($(this).height() &gt; maxheight) { maxheight = $(this).height(); } });  $(&quot;div.col&quot;).height(maxheight); <\/code><\/pre>\n<p>  <a href=\"http:\/\/web.enavu.com\/tutorials\/top-10-jquery-snippets-including-jquery-1-4\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0422\u0430\u0431\u043b\u0438\u0447\u043d\u044b\u0435 \u043f\u043e\u043b\u043e\u0441\u044b (\u0437\u0435\u0431\u0440\u0430)<\/h4>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0442\u0430\u0431\u043b\u0438\u0446\u044b, \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0446\u0432\u0435\u0442\u0430 \u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435 \u043e\u0434\u043d\u043e\u0437\u043d\u0430\u0447\u043d\u043e \u043f\u043e\u0432\u044b\u0448\u0430\u044e\u0442 \u0447\u0438\u0442\u0430\u0435\u043c\u043e\u0441\u0442\u044c. \u0412\u043e\u0442 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u0434\u043b\u044f \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0433\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u044f CSS \u043a\u043b\u0430\u0441\u0441\u0430 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0442\u0440\u043e\u043a \u0442\u0430\u0431\u043b\u0438\u0446\u044b.<\/p>\n<pre><code class=\"javascript\">$(document).ready(function(){                                   $(&quot;table tr:even&quot;).addClass('stripe'); }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/www.alovefordesign.com\/5-jquery-must-have-code-snippets\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0427\u0430\u0441\u0442\u0438\u0447\u043d\u043e\u0435 \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b<\/h4>\n<p>  \u0415\u0441\u043b\u0438 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u043d\u043e\u0432\u0438\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b, \u0442\u043e \u044d\u0442\u0438 3 \u0441\u0442\u0440\u043e\u043a\u0438 \u043a\u043e\u0434\u0430 \u0442\u043e\u0447\u043d\u043e \u043f\u043e\u043c\u043e\u0433\u0443\u0442. \u0412 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 div \u0441 id #refresh \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0435 10 \u0441\u0435\u043a\u0443\u043d\u0434.<\/p>\n<pre><code class=\"javascript\">setInterval(function() {   $(&quot;#refresh&quot;).load(location.href+&quot; #refresh&gt;*&quot;,&quot;&quot;); }, 10000); \/\/ milliseconds to wait <\/code><\/pre>\n<p>  <a href=\"http:\/\/web.enavu.com\/tutorials\/top-10-jquery-snippets-including-jquery-1-4\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u041f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h4>\n<p>  jQuery \u0443\u043f\u0440\u043e\u0449\u0430\u0435\u0442 \u043f\u0440\u0435\u0434\u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0444\u043e\u043d\u0435, \u0442\u0430\u043a \u0447\u0442\u043e \u043f\u043e\u0441\u0435\u0442\u0438\u0442\u0435\u043b\u044f\u043c \u043d\u0435 \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0436\u0434\u0430\u0442\u044c \u0446\u0435\u043b\u0443\u044e \u0432\u0435\u0447\u043d\u043e\u0441\u0442\u044c, \u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u044f\u0432\u044f\u0442\u0441\u044f \u0436\u0435\u043b\u0430\u0435\u043c\u044b\u0435 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u041a\u043e\u0434 \u0433\u043e\u0442\u043e\u0432 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e, \u043f\u0440\u043e\u0441\u0442\u043e \u043e\u0442\u0440\u0435\u0434\u0430\u043a\u0442\u0438\u0440\u0443\u0439\u0442\u0435 \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437\u043e\u0431\u043e\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 8.<\/p>\n<pre><code class=\"javascript\">$.preloadImages = function() {        for(var i = 0; i&lt;arguments.length; i++) {                $(&quot;&lt;img \/&gt;&quot;).attr(&quot;src&quot;, arguments[i]);        } }  $(document).ready(function() {        $.preloadImages(&quot;hoverimage1.jpg&quot;,&quot;hoverimage2.jpg&quot;); }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/css-tricks.com\/snippets\/jquery\/image-preloader\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u041e\u0442\u043a\u0440\u044b\u0442\u0438\u0435 \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a \u0432 \u043d\u043e\u0432\u043e\u043c \u043e\u043a\u043d\u0435 \u0438\u043b\u0438 \u043d\u043e\u0432\u043e\u0439 \u0432\u043a\u043b\u0430\u0434\u043a\u0435<\/h4>\n<p>  \u0410\u0442\u0442\u0440\u0438\u0431\u0443\u0442 target=&quot;_blank&quot; \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0432\u0430\u043c \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0442\u044c \u0441\u0441\u044b\u043b\u043a\u0438 \u0432 \u043d\u043e\u0432\u044b\u0445 \u043e\u043a\u043d\u0430\u0445. \u041d\u043e \u044d\u0442\u043e \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043e\u0442\u043a\u0440\u044b\u0442\u0438\u044e \u0432\u043d\u0435\u0448\u043d\u0438\u0445 \u0441\u0441\u044b\u043b\u043e\u043a, \u0432\u043d\u0443\u0442\u0440\u0438\u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0441\u044b\u043b\u043a\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u043e\u043a\u0440\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0442\u043e\u043c \u0436\u0435 \u043e\u043a\u043d\u0435.<br \/>  \u042d\u0442\u043e\u0442 \u043a\u043e\u0434 \u043d\u0430\u0445\u043e\u0434\u0438\u0442 \u0432\u043d\u0435\u0448\u043d\u044e\u044e \u0441\u0441\u044b\u043b\u043a\u0443 \u0438 \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u0442 \u0432 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0430\u0442\u0442\u0440\u0438\u0431\u0443\u0442 target=&quot;_blank&quot;.<\/p>\n<pre><code class=\"javascript\">$('a').each(function() {    var a = new RegExp('\/' + window.location.host + '\/');    if(!a.test(this.href)) {        $(this).click(function(event) {            event.preventDefault();            event.stopPropagation();            window.open(this.href, '_blank');        });    } }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/css-tricks.com\/snippets\/jquery\/open-external-links-in-new-window\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>Div \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435\/\u0432\u044b\u0441\u043e\u0442\u0435 \u0432\u044c\u044e\u043f\u043e\u0440\u0442\u0430<\/h4>\n<p>  \u042d\u0442\u043e\u0442 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043a\u043e\u0434\u0430 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0440\u0430\u0441\u0442\u044f\u043d\u0443\u0442\u044b\u0439 \u043f\u043e \u0448\u0438\u0440\u0438\u043d\u0435\/\u0432\u044b\u0441\u043e\u0442\u0435 \u0432\u044c\u044e\u043f\u043e\u0440\u0442\u0430 div. \u041a\u043e\u0434 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u043e\u043a\u043d\u0430. \u041f\u0440\u0435\u043a\u0440\u0430\u0441\u043d\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0434\u043b\u044f \u043c\u043e\u0434\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0438\u0430\u043b\u043e\u0433\u043e\u0432 \u0438 popup-\u043e\u043a\u043e\u043d.<\/p>\n<pre><code class=\"javascript\">\/\/ global vars var winWidth = $(window).width(); var winHeight = $(window).height();  \/\/ set initial div height \/ width $('div').css({     'width': winWidth, 'height': winHeight, });  \/\/ make sure div stays full width\/height on resize $(window).resize(function(){     $('div').css({     'width': winWidth,     'height': winHeight, }); }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/www.jqueryrain.com\/2013\/03\/div-full-widthheight-of-viewport-with-jquery\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044f<\/h4>\n<p>  \u041a\u043e\u0433\u0434\u0430 \u0432\u044b \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f\u043c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u044b\u0439 \u0432\u044b\u0431\u043e\u0440 \u043f\u0430\u0440\u043e\u043b\u044f, \u0431\u044b\u043b\u043e \u0431\u044b \u043d\u0435\u043f\u043b\u043e\u0445\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u0435\u043d \u0438\u0445 \u043f\u0430\u0440\u043e\u043b\u044c. \u041a\u043e\u0434 \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u0430 \u0438\u043c\u0435\u043d\u043d\u043e \u044d\u0442\u043e \u0438 \u0434\u0435\u043b\u0430\u0435\u0442.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043f\u043e\u043b\u044f \u0432\u0432\u043e\u0434\u0430:<\/p>\n<pre><code class=\"html\">&lt;input type=&quot;password&quot; name=&quot;pass&quot; id=&quot;pass&quot; \/&gt; &lt;span id=&quot;passstrength&quot;&gt;&lt;\/span&gt; <\/code><\/pre>\n<p>  \u0418 \u0434\u0430\u043b\u0435\u0435 \u043d\u0435\u043c\u043d\u043e\u0433\u043e jQuery \u043a\u043e\u0434\u0430. \u0412\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u043f\u0430\u0440\u043e\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0432\u0435\u0440\u0435\u043d \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u0433\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0438 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0431\u0443\u0434\u0435\u0442 \u0432\u044b\u0432\u0435\u0434\u0435\u043d\u043e \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u0435 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u043b\u043e\u0436\u0435\u043d \u0435\u0433\u043e \u043f\u0430\u0440\u043e\u043b\u044c.<\/p>\n<pre><code class=\"javascript\">$('#pass').keyup(function(e) {      var strongRegex = new RegExp(&quot;^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\\\W).*$&quot;, &quot;g&quot;);      var mediumRegex = new RegExp(&quot;^(?=.{7,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))).*$&quot;, &quot;g&quot;);      var enoughRegex = new RegExp(&quot;(?=.{6,}).*&quot;, &quot;g&quot;);      if (false == enoughRegex.test($(this).val())) {              $('#passstrength').html('More Characters');      } else if (strongRegex.test($(this).val())) {              $('#passstrength').className = 'ok';              $('#passstrength').html('Strong!');      } else if (mediumRegex.test($(this).val())) {              $('#passstrength').className = 'alert';              $('#passstrength').html('Medium!');      } else {              $('#passstrength').className = 'error';              $('#passstrength').html('Weak!');      }      return true; }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/css-tricks.com\/snippets\/jquery\/password-strength\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0418\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f<\/h4>\n<p>  \u0412\u044b \u043a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u0435\u0442\u0435 \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0432\u0430\u0448\u0438\u0445 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f PHP \u0438 GD-\u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0443), \u043d\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0439 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e jQuery. \u0412\u043e\u0442 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e.<\/p>\n<pre><code class=\"javascript\">$(window).bind(&quot;load&quot;, function() { \t\/\/ IMAGE RESIZE \t$('#product_cat_list img').each(function() { \t\tvar maxWidth = 120; \t\tvar maxHeight = 120; \t\tvar ratio = 0; \t\tvar width = $(this).width(); \t\tvar height = $(this).height(); \t \t\tif(width &gt; maxWidth){ \t\t\tratio = maxWidth \/ width; \t\t\t$(this).css(&quot;width&quot;, maxWidth); \t\t\t$(this).css(&quot;height&quot;, height * ratio); \t\t\theight = height * ratio; \t\t} \t\tvar width = $(this).width(); \t\tvar height = $(this).height(); \t\tif(height &gt; maxHeight){ \t\t\tratio = maxHeight \/ height; \t\t\t$(this).css(&quot;height&quot;, maxHeight); \t\t\t$(this).css(&quot;width&quot;, width * ratio); \t\t\twidth = width * ratio; \t\t} \t}); \t\/\/$(&quot;#contentpage img&quot;).show(); \t\/\/ IMAGE RESIZE }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/snipplr.com\/view\/62552\/mage-resize\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0410\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430 \u043f\u043e \u0441\u043a\u0440\u043e\u043b\u043b\u0443<\/h4>\n<p>  \u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0430\u0439\u0442\u044b, \u0442\u0430\u043a\u0438\u0435 \u043a\u0430\u043a <a href=\"https:\/\/twitter.com\/\">Twitter<\/a> \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u044e\u0442 \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u043f\u043e \u0441\u043a\u0440\u043e\u043b\u043b\u0443. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0432\u0435\u0441\u044c \u043a\u043e\u043d\u0442\u0435\u043d\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u0447\u0435\u0441\u043a\u0438 \u043f\u043e\u0434\u0433\u0440\u0443\u0436\u0430\u0435\u0442\u0441\u044f \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u043f\u0440\u043e\u043a\u0440\u0443\u0442\u043a\u0438 \u0432\u043d\u0438\u0437.<br \/>  \u0412\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u044d\u0444\u0444\u0435\u043a\u0442 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u0441\u0430\u0439\u0442\u0435.<\/p>\n<pre><code class=\"javascript\">var loading = false; $(window).scroll(function(){ \tif((($(window).scrollTop()+$(window).height())+250)&gt;=$(document).height()){ \t\tif(loading == false){ \t\t\tloading = true; \t\t\t$('#loadingbar').css(&quot;display&quot;,&quot;block&quot;); \t\t\t$.get(&quot;load.php?start=&quot;+$('#loaded_max').val(), function(loaded){ \t\t\t\t$('body').append(loaded); \t\t\t\t$('#loaded_max').val(parseInt($('#loaded_max').val())+50); \t\t\t\t$('#loadingbar').css(&quot;display&quot;,&quot;none&quot;); \t\t\t\tloading = false; \t\t\t}); \t\t} \t} });  $(document).ready(function() { \t$('#loaded_max').val(50); }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/fatfolderdesign.com\/173\/content-load-on-scroll-with-jquery\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u041f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u043e\u0441\u044c \u043b\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435<\/h4>\n<p>  \u0412\u043e\u0442 \u0441\u043d\u0438\u043f\u043f\u0435\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u044f \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f\u043c\u0438, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e, \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u0441\u043f\u043e\u0441\u043e\u0431 \u0443\u0437\u043d\u0430\u0442\u044c, \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043b\u043e\u0441\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u0438\u043b\u0438 \u043d\u0435\u0442.<\/p>\n<pre><code class=\"javascript\">var imgsrc = 'img\/image1.png'; $('&lt;img\/&gt;').load(function () {     alert('image loaded'); }).error(function () {     alert('error loading image'); }).attr('src', imgsrc); <\/code><\/pre>\n<p>  <a href=\"http:\/\/tympanus.net\/codrops\/2010\/01\/05\/some-useful-javascript-jquery-snippets\/\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a><\/p>\n<h4>\u0421\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435<\/h4>\n<p>  \u0412 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u0431\u044b\u0432\u0430\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u0430 \u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u0438\u043d\u043d\u043e\u0433\u043e \u0441\u043f\u0438\u0441\u043a\u0430 \u0432 \u0430\u043b\u0444\u0430\u0432\u0438\u0442\u043d\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435. \u0414\u0430\u043d\u043d\u044b\u0439 \u0441\u043d\u0438\u043f\u043f\u0435\u0442 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u043b\u044e\u0431\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0438 \u0441\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u0442 \u0435\u0433\u043e.<\/p>\n<pre><code class=\"javascript\">$(function() {     $.fn.sortList = function() {     var mylist = $(this);     var listitems = $('li', mylist).get();     listitems.sort(function(a, b) {         var compA = $(a).text().toUpperCase();         var compB = $(b).text().toUpperCase();         return (compA &lt; compB) ? -1 : 1;     });     $.each(listitems, function(i, itm) {         mylist.append(itm);     });    }      $(&quot;ul#demoOne&quot;).sortList();  }); <\/code><\/pre>\n<p>  <a href=\"http:\/\/stackoverflow.com\/questions\/13394796\/javascript-jquery-to-sort-alphabetically-a-list-with-anchors\">\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a<\/a>   \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\/211538\/\"> http:\/\/habrahabr.ru\/post\/211538\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">       <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d6c\/877\/8ef\/d6c8778ef80f45ef0493af817ced5d0f.png\"\/><\/p>\n<p>  \u0421\u043f\u0443\u0441\u0442\u044f \u0433\u043e\u0434\u044b \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430 jQuery \u0441\u0442\u0430\u043b\u0430 \u043d\u0435\u043e\u0442\u044a\u0435\u043c\u043b\u0435\u043c\u043e\u0439 \u0447\u0430\u0441\u0442\u044c\u044e \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e web-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0430. \u0412\u0435\u0434\u044c \u043e\u043d\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438, \u0431\u044b\u0441\u0442\u0440\u0430\u044f \u0438 \u0438\u043c\u0435\u0435\u0442 \u043e\u0447\u0435\u043d\u044c \u0448\u0438\u0440\u043e\u043a\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438. \u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u0434\u0435\u0441\u044f\u0442\u0438 \u0441\u043d\u0438\u043f\u043f\u0435\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0441\u0432\u043e\u0431\u043e\u0434\u043d\u043e \u0431\u0440\u0430\u0442\u044c \u0434\u043b\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f. \u0418\u0445 \u043e\u0447\u0435\u043d\u044c \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u0434 \u043d\u0443\u0436\u0434\u044b \u0432\u0430\u0448\u0438\u0445 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.  <\/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-211538","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211538","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=211538"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/211538\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=211538"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=211538"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=211538"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}