{"id":218485,"date":"2014-04-07T15:31:03","date_gmt":"2014-04-07T11:31:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=218485"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=218485","title":{"rendered":"<span class=\"post_title\">\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u044f js \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u0434\u0436\u0443\u043d\u0438\u043e\u0440\u043e\u0432<\/span>"},"content":{"rendered":"<div class=\"content html_format\"> \t\t\t<habracut text=\"\u0412 \u0431\u043e\u0439\"\/><br \/>  \u0421 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043f\u043e\u0440 \u044f \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0441\u0444\u0435\u0440\u0435 web \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438 \u0435\u0449\u0435 \u043d\u0430\u0445\u043e\u0436\u0443\u0441\u044c \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u043f\u0430\u0434\u0430\u0432\u0430\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0442\u043a\u0440\u044b\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e javascript \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0433\u043a\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 javascript\u00bb, \u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/282\/600\/6c3\/2826006c3d487c144498adfa32c4978f.png\" alt=\"image\"\/><\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0442\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0436\u0435\u0434\u0430\u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0438 \u0434\u0443\u043c\u0430\u044e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u043e\u0434\u0435\u043b\u044f\u0442\u0441\u044f \u0438\u043c\u0438.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0443 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e:<br \/>  \u00ab\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 js \u043a\u043e\u0434 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0442\u043e \u0431\u044b \u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u00bb.<\/p>\n<p>  \u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0447\u0443\u0436\u0438\u043c \u0441\u0430\u0439\u0442\u043e\u043c, \u0433\u0434\u0435 \u0432\u0435\u0441\u044c js \u0431\u044b\u043b \u0432 \u043e\u0434\u043d\u043e\u043c, \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0442\u0443\u043f \u0430\u043f\u0430\u0442\u0438\u0438.<\/p>\n<p>  \u0412\u0441\u044f \u0441\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u042f \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u0438\u0445 \u00ab\u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u0445 \u0441\u0443\u0442\u044c. <\/p>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u043d \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445 \u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0438\u043c \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e. \u0412\u0438\u0434\u0436\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b.<\/p>\n<p>  \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0438\u0434\u0436\u0435\u0442 \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/1f9\/a28\/199\/1f9a28199d330b9d4050d21d1e905234.png\" alt=\"image\"\/><\/p>\n<p>  \u041d\u0430\u0448 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 3 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. <br \/>  1. \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u2014 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<br \/>  2. \u041f\u0440\u043e\u0444\u0438\u043b\u044c \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043f\u0440\u0438\u0432\u0435\u0442 \u0420\u0438\u0447\u0430\u0440\u0434 \ud83d\ude42 ), \u0438 \u043c\u0435\u043d\u044e \u0441 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<br \/>  3. \u041f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0443 \u044d\u0442\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430<\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0443\u043b\u0438.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c js \u0444\u0430\u0439\u043b\u0435. <br \/>  Html \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0438 CSS \u0441\u0442\u0438\u043b\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041e\u0442\u043c\u0435\u0447\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 <a href=\"http:\/\/underscorejs.ru\/\">underscore.js<\/a>. \u0410 \u0441\u0442\u0438\u043b\u0438, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e css \u0444\u0430\u0439\u043b\u0430. <\/p>\n<h5>\u0413\u043b\u043e\u0431\u0430\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c App.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c  var App = (function(){ \t\/\/\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \t\/\/\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \tvar someArray = []; \/\/\u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 App.someArray, \u043d\u0435 \u043a\u0430\u043a \u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u0432\u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430  \t\/\/\u041e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 API \treturn { \t\tinit: function(){ \t\t\t\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \t\t\tProfile.init(); \t\t\tPortfolio.init(); \t\t} \t} })();  \/\/\u0418 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c App.init(); <\/code><\/pre>\n<h5>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044f Profile.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">var Profile = (function(){ \t\/\/\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f \tvar url = 'http:\/\/someweb.com'; \t\/\/\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 html \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \tvar el = '.div-profile';  \treturn { \t\t\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \t\tinit: function(){ \t\t\t\/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043c\u0435\u043d\u044e \u0438 \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \t\t\tvar profileData = this.getData(url); \t\t}, \t\tgetData: function(url){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 ajax \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e res \t\t\t*\/  \t\t\t\/\/\u041e\u0442\u0440\u0438\u0441\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \t\t\tthis.render(res); \t\t}, \t\trender: function(){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f html \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \t\t\t* \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e html \t\t\t*\/  \t\t\t\/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0443\u043b\u044f.  \/\/\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f jQuery \t\t\t$(el).html(html);  \t\t\t\/\/\u0418 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c DOM \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a \u043d\u0443\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044f \t\t\tthis.event(); \t\t}, \t\tevent: function(){ \t\t\t\/\/\u041f\u0443\u0441\u0442\u044c \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e \u0438\u043c\u0435\u044e\u0442 \u043a\u043b\u0430\u0441\u0441 .menu-item \t\t\t\/\/\u0418 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 data-list-id \t\t\t$('.menu-item').click(function(){ \t\t\t\tvar id = $(this).data('list-id');  \t\t\t\t\/\/\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043b\u0438\u043a\u043d\u0443\u043b \u043f\u0443\u043d\u043a\u0442.  \t\t\t\t\/\/\u041d\u0430 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \t\t\t\t\/\/\u0412 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c id \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \t\t\t\t$(window).trigger('clickItem', {id: id}); \t\t\t}); \t\t} \t} })(); <\/code><\/pre>\n<h5>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e Portfolio.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">var Portfolio = (function(){  \t\/\/\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \t$this = this;         var el = '.portfolio'  \treturn { \t\tinit: function(){  \t\t\t\/\/\u041f\u043e\u0432\u0435\u0441\u0438\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \t\t\t$(window).on('clickItem', function(e, data){ \t\t\t\t$this.getData(data.id) \t\t\t}); \t\t}, \t\tgetData: function(id){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e. \u041f\u0443\u0441\u0442\u044c \u043e\u043d\u0438 \u0442\u0430\u043a \u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 res \t\t\t*\/ \t\t\tthis.render(res); \t\t}, \t\trender: function(data){ \t\t\t\/* \t\t\t* \u0418 \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0432\u0430\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \t\t\t*\/ \t\t}, \t\tevent: function(){ \t\t\t\/* \t\t\t* \u041d\u0430\u0432\u0435\u0441\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \t\t\t*\/ \t\t} \t} }); <\/code><\/pre>\n<h6>\u0427\u0442\u043e \u044d\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442<\/h6>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u0434 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c. \u041b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u0438 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044f \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447 \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0442\u043e \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u0443\u043d\u043a\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435. \u041d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &#8216;clickItem&#8217; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043a\u043d\u043e, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e? \u041d\u0435 \u0432\u043e\u043f\u0440\u043e\u0441. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 event \u043c\u043e\u0434\u0443\u043b\u044f Portfolio \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435  <\/p>\n<pre><code class=\"javascript\">\/\/'.portfolio-item' - \u043a\u043b\u0430\u0441\u0441-\u043e\u0431\u0435\u0440\u0442\u043a\u0430, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b $('.portfolio-item').click(function(){ \t$(window).trigger('showModal'); }); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043e\u043a\u043d\u0430, \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u2014 \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &#8216;showModal&#8217; \u0438 \u0432\u0441\u0435.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d.<\/p>\n<p>  \u041f\u043e \u0442\u0435\u043c\u0435 \u0442\u0430\u043a \u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/largescalejs.ru\/\">largescalejs.ru<\/a>.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"http:\/\/yepnopejs.com\/\">yepnope.js<\/a>.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \t\t\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\/218485\/\"> http:\/\/habrahabr.ru\/post\/218485\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\"> \t\t\t<habracut text=\"\u0412 \u0431\u043e\u0439\"\/>\u0439&#187;\/<br \/>  \u0421 \u043d\u0435\u0434\u0430\u0432\u043d\u0438\u0445 \u043f\u043e\u0440 \u044f \u0441\u0442\u0430\u043b \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432 \u0441\u0444\u0435\u0440\u0435 web \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438, \u0438 \u0435\u0449\u0435 \u043d\u0430\u0445\u043e\u0436\u0443\u0441\u044c \u0432 \u0441\u0442\u0430\u0434\u0438\u0438 \u043f\u0430\u0434\u0430\u0432\u0430\u043d\u0430. \u041e\u0434\u043d\u0430\u043a\u043e \u043d\u0435\u0434\u0430\u0432\u043d\u043e \u044f \u043e\u0442\u043a\u0440\u044b\u043b \u0434\u043b\u044f \u0441\u0435\u0431\u044f \u0441\u043f\u043e\u0441\u043e\u0431 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u0430\u0446\u0438\u0438 \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u043e\u0433\u043e javascript \u043a\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d \u0432 \u043b\u044e\u0431\u043e\u0439 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u043f\u0440\u043e\u0435\u043a\u0442 \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043b\u0435\u0433\u043a\u043e \u043e\u0441\u0432\u043e\u0438\u0442\u044c.<\/p>\n<p>  \u042d\u0442\u043e\u0442 \u043f\u043e\u0434\u0445\u043e\u0434 \u043d\u0430\u0437\u044b\u0432\u0430\u044e\u0442 \u00ab\u041c\u043e\u0434\u0443\u043b\u044c\u043d\u044b\u0439 javascript\u00bb, \u0438 \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0435\u0433\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c.<\/p>\n<p>  \u0421\u0442\u0430\u0442\u044c\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0430 \u0442\u0430\u043a, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043b\u044e\u0434\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u0434\u0436\u0435\u0434\u0430\u044f \u0443\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0438 \u0434\u0443\u043c\u0430\u044e \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445 \u043f\u043e\u0434\u0435\u043b\u044f\u0442\u0441\u044f \u0438\u043c\u0438.<\/p>\n<p>  \u0417\u0430\u0434\u0430\u0447\u0443 \u044f \u0441\u0442\u0430\u0432\u0438\u043b \u0441\u0435\u0431\u0435 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e:<br \/>  \u00ab\u041e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u044c \u043a\u043b\u0438\u0435\u043d\u0442\u0441\u043a\u0438\u0439 js \u043a\u043e\u0434 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c, \u0447\u0442\u043e \u0431\u044b \u0435\u0433\u043e \u0431\u044b\u043b\u043e \u043b\u0435\u0433\u043a\u043e \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0442\u044c, \u0438\u0441\u043a\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0438 \u0438 \u0434\u043e\u043f\u043e\u043b\u043d\u044f\u0442\u044c\u00bb.<\/p>\n<p>  \u041c\u043e\u0442\u0438\u0432\u0430\u0446\u0438\u0435\u0439 \u044d\u0442\u043e\u043c\u0443 \u0441\u0442\u0430\u043b\u0430 \u0440\u0430\u0431\u043e\u0442\u0430 \u0441 \u0447\u0443\u0436\u0438\u043c \u0441\u0430\u0439\u0442\u043e\u043c, \u0433\u0434\u0435 \u0432\u0435\u0441\u044c js \u0431\u044b\u043b \u0432 \u043e\u0434\u043d\u043e\u043c, \u043e\u0433\u0440\u043e\u043c\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u0438 \u043f\u043e\u043f\u044b\u0442\u043a\u0430 \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u0447\u0442\u043e-\u0442\u043e \u0432\u044b\u0437\u044b\u0432\u0430\u043b\u0430 \u043f\u0440\u0438\u0441\u0442\u0443\u043f \u0430\u043f\u0430\u0442\u0438\u0438.<\/p>\n<p>  \u0412\u0441\u044f \u0441\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0438\u043a\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u0440\u0430\u0437\u0431\u0438\u0435\u043d\u0438\u044e \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043d\u0430 \u043c\u043e\u0434\u0443\u043b\u0438. \u042f \u0442\u0430\u043a \u0436\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u044e \u0438\u0445 \u00ab\u0432\u0438\u0434\u0436\u0435\u0442\u0430\u043c\u0438\u00bb, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u0442\u0430\u043a \u043f\u0440\u043e\u0449\u0435 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u0445 \u0441\u0443\u0442\u044c. <\/p>\n<p>  \u041a\u0430\u0436\u0434\u044b\u0439 \u0432\u0438\u0434\u0436\u0435\u0442 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u043d\u043e\u0439 \u0441\u0443\u0449\u043d\u043e\u0441\u0442\u044c\u044e. \u041e\u043d \u043d\u0435 \u0437\u043d\u0430\u0435\u0442 \u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0432\u0438\u0434\u0436\u0435\u0442\u0430\u0445 \u0438 \u043d\u0435 \u043e\u0431\u0440\u0430\u0449\u0430\u0435\u0442\u0441\u044f \u043a \u043d\u0438\u043c \u043d\u0430 \u043f\u0440\u044f\u043c\u0443\u044e. \u0412\u0438\u0434\u0436\u0435\u0442 \u043c\u043e\u0436\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0441\u0430\u043c \u0441 \u0441\u043e\u0431\u043e\u0439 \u0438 \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u044f, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u0432\u0438\u0434\u0436\u0435\u0442\u044b.<\/p>\n<p>  \u0421\u0445\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u0438\u0434\u0436\u0435\u0442 \u2014 \u044d\u0442\u043e \u043d\u0435\u043a\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430, \u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0435\u0441\u0442\u044c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c. <\/p>\n<p>  \u041d\u0430\u0448 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u0439 \u0441\u0430\u0439\u0442 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043c\u044b\u0441\u043b\u0435\u043d\u043d\u043e \u0440\u0430\u0437\u0431\u0438\u0442\u044c \u043d\u0430 3 \u0432\u0438\u0434\u0436\u0435\u0442\u0430. <br \/>  1. \u0413\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u2014 \u0431\u0443\u0434\u0435\u0442 \u043e\u0442\u0432\u0435\u0447\u0430\u0442\u044c \u0437\u0430 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0434\u0440\u0443\u0433\u0438\u0445 \u043c\u043e\u0434\u0443\u043b\u0435\u0439.<br \/>  2. \u041f\u0440\u043e\u0444\u0438\u043b\u044c \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044f (\u043f\u0440\u0438\u0432\u0435\u0442 \u0420\u0438\u0447\u0430\u0440\u0434 \ud83d\ude42 ), \u0438 \u043c\u0435\u043d\u044e \u0441 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0434\u0435\u044f\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<br \/>  3. \u041f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e \u2014 \u043e\u0442\u043e\u0431\u0440\u0430\u0437\u0438\u0442 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u043c\u0443 \u043d\u0430\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044e \u0443 \u044d\u0442\u043e\u0433\u043e \u044e\u0437\u0435\u0440\u0430<\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u0441\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043d\u0430\u0448\u0438 \u043c\u043e\u0434\u0443\u043b\u0438.<br \/>  \u041a\u0430\u0436\u0434\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c js \u0444\u0430\u0439\u043b\u0435. <br \/>  Html \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0438 CSS \u0441\u0442\u0438\u043b\u0438 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c. \u041e\u0442\u043c\u0435\u0447\u0443 \u043b\u0438\u0448\u044c, \u0447\u0442\u043e \u0434\u043b\u044f \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u044f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440 \u0432\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0432 \u0441\u043e\u0441\u0442\u0430\u0432 <a href=\"http:\/\/underscorejs.ru\/\">underscore.js<\/a>. \u0410 \u0441\u0442\u0438\u043b\u0438, \u0432 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u043c, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0438\u0437 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e css \u0444\u0430\u0439\u043b\u0430. <\/p>\n<h5>\u0413\u043b\u043e\u0431\u0430\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c App.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ \u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0438\u0437 \u0441\u0435\u0431\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043f\u0440\u0438\u0441\u0432\u043e\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0441\u0430\u043c\u043e\u0432\u044b\u0437\u044b\u0432\u0430\u044e\u0449\u0435\u0439\u0441\u044f \u0430\u043d\u043e\u043d\u0438\u043c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \/\/ \u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0431\u044a\u0435\u043a\u0442, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u044b\u0439 API \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043c\u043e\u0434\u0443\u043b\u0435\u043c  var App = (function(){ \t\/\/\u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0438 \u043c\u0435\u0442\u043e\u0434\u044b \t\/\/\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \tvar someArray = []; \/\/\u041d\u0435 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0441\u0441\u044b\u043b\u043a\u0435 App.someArray, \u043d\u0435 \u043a\u0430\u043a \u043b\u0438\u0431\u043e \u0435\u0449\u0435 \u0432\u043d\u0435 \u043e\u0431\u044a\u0435\u043a\u0442\u0430  \t\/\/\u041e\u0431\u044a\u0435\u043a\u0442, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043f\u0443\u0431\u043b\u0438\u0447\u043d\u043e\u0435 API \treturn { \t\tinit: function(){ \t\t\t\/\/ \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f. \u0412 \u043d\u0435\u0439 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0432\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \t\t\tProfile.init(); \t\t\tPortfolio.init(); \t\t} \t} })();  \/\/\u0418 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448 \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c App.init(); <\/code><\/pre>\n<h5>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u0440\u043e\u0444\u0438\u043b\u044f Profile.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">var Profile = (function(){ \t\/\/\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043f\u0443\u0442\u044c \u0434\u043e \u0441\u0435\u0440\u0432\u0435\u0440\u0430, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0435\u0433\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0434\u043b\u044f \u043c\u043e\u0434\u0443\u043b\u044f \tvar url = 'http:\/\/someweb.com'; \t\/\/\u041f\u0440\u0438\u0432\u0430\u0442\u043d\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f \u0445\u0440\u0430\u043d\u044f\u0449\u0430\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 html \u044d\u043b\u0435\u043c\u0435\u043d\u0442, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0443\u043b\u044c \tvar el = '.div-profile';  \treturn { \t\t\/\/\u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043c\u043e\u0434\u0443\u043b\u044f \t\tinit: function(){ \t\t\t\/\/ \u041f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u043d\u043a\u0442\u043e\u0432 \u043c\u0435\u043d\u044e \u0438 \u0430\u0432\u0430\u0442\u0430\u0440\u043a\u0443 \u0441 \u0441\u0435\u0440\u0432\u0435\u0440\u0430 \t\t\tvar profileData = this.getData(url); \t\t}, \t\tgetData: function(url){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 ajax \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0443\u0441\u043f\u0435\u0445\u0430 \u0441\u043e\u0445\u0440\u0430\u043d\u0438\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e res \t\t\t*\/  \t\t\t\/\/\u041e\u0442\u0440\u0438\u0441\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \t\t\tthis.render(res); \t\t}, \t\trender: function(){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043a\u043e\u0434 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f html \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0438, \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0432\u0430\u0448\u0435\u0433\u043e \u043b\u044e\u0431\u0438\u043c\u043e\u0433\u043e \u0448\u0430\u0431\u043b\u043e\u043d\u0438\u0437\u0430\u0442\u043e\u0440\u0430. \t\t\t* \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0438\u0440\u0443\u044e\u0449\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0431\u0443\u0434\u0435\u0442 \u0441\u043e\u0445\u0440\u0430\u043d\u0435\u043d\u0430 \u0432 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e html \t\t\t*\/  \t\t\t\/\/\u0414\u043e\u0431\u0430\u0432\u0438\u043c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u0443\u044e \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0443 \u0432 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u043c\u043e\u0434\u0443\u043b\u044f.  \/\/\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u043c \u0447\u0442\u043e \u043d\u0430 \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f jQuery \t\t\t$(el).html(html);  \t\t\t\/\/\u0418 \u043f\u0440\u0438\u0432\u044f\u0436\u0435\u043c DOM \u0441\u043e\u0431\u044b\u0442\u0438\u044f \u043a \u043d\u0443\u0436\u043d\u044b\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u043c \u043c\u043e\u0434\u0443\u043b\u044f \t\t\tthis.event(); \t\t}, \t\tevent: function(){ \t\t\t\/\/\u041f\u0443\u0441\u0442\u044c \u043f\u0443\u043d\u043a\u0442\u044b \u043c\u0435\u043d\u044e \u0438\u043c\u0435\u044e\u0442 \u043a\u043b\u0430\u0441\u0441 .menu-item \t\t\t\/\/\u0418 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442 \u0430\u0442\u0440\u0438\u0431\u0443\u0442 data-list-id \t\t\t$('.menu-item').click(function(){ \t\t\t\tvar id = $(this).data('list-id');  \t\t\t\t\/\/\u0422\u0435\u043f\u0435\u0440\u044c \u0441\u0430\u043c\u043e\u0435 \u0432\u0430\u0436\u043d\u043e\u0435. \u0413\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0435, \u0447\u0442\u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u043a\u043b\u0438\u043a\u043d\u0443\u043b \u043f\u0443\u043d\u043a\u0442.  \t\t\t\t\/\/\u041d\u0430 \u044d\u0442\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u0435 \u0438 \u0431\u0443\u0434\u0443\u0442 \u043f\u043e\u0434\u043f\u0438\u0441\u044b\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u0440\u0443\u0433\u0438\u0435 \u043c\u043e\u0434\u0443\u043b\u0438 \t\t\t\t\/\/\u0412 \u0442\u0440\u0438\u0433\u0433\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c id \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0443\u043d\u043a\u0442\u0430 \t\t\t\t$(window).trigger('clickItem', {id: id}); \t\t\t}); \t\t} \t} })(); <\/code><\/pre>\n<h5>\u041c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e Portfolio.js<\/h5>\n<p>  <\/p>\n<pre><code class=\"javascript\">var Portfolio = (function(){  \t\/\/\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \t$this = this;         var el = '.portfolio'  \treturn { \t\tinit: function(){  \t\t\t\/\/\u041f\u043e\u0432\u0435\u0441\u0438\u043c \u0441\u043b\u0443\u0448\u0430\u0442\u0435\u043b\u044c \u043d\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0441\u0442\u043e\u043c\u043d\u043e\u0433\u043e \u0441\u043e\u0431\u044b\u0442\u0438\u044f. \u0412 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043f\u0435\u0440\u0435\u0434\u0430\u0434\u0438\u043c \u043f\u0440\u0438\u0448\u0435\u0434\u0448\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \t\t\t$(window).on('clickItem', function(e, data){ \t\t\t\t$this.getData(data.id) \t\t\t}); \t\t}, \t\tgetData: function(id){ \t\t\t\/* \t\t\t* \u0422\u0443\u0442 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440 \u0438 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0430\u0448\u0438 \u0440\u0430\u0431\u043e\u0442\u044b \u0432 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e. \u041f\u0443\u0441\u0442\u044c \u043e\u043d\u0438 \u0442\u0430\u043a \u0436\u0435 \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044e\u0442\u0441\u044f \u0432 res \t\t\t*\/ \t\t\tthis.render(res); \t\t}, \t\trender: function(data){ \t\t\t\/* \t\t\t* \u0418 \u0441\u043d\u043e\u0432\u0430 \u043e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c \u0432\u0430\u043c \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u043c \t\t\t*\/ \t\t}, \t\tevent: function(){ \t\t\t\/* \t\t\t* \u041d\u0430\u0432\u0435\u0441\u0438\u043c \u043d\u0443\u0436\u043d\u044b\u0435 \u0441\u043e\u0431\u044b\u0442\u0438\u044f \t\t\t*\/ \t\t} \t} }); <\/code><\/pre>\n<h6>\u0427\u0442\u043e \u044d\u0442\u043e \u043d\u0430\u043c \u0434\u0430\u0435\u0442<\/h6>\n<p>  <\/p>\n<ul>\n<li>\u041a\u043e\u0434 \u0440\u0430\u0437\u0434\u0435\u043b\u0435\u043d \u043f\u043e \u0444\u0430\u0439\u043b\u0430\u043c. \u041b\u0435\u0433\u043a\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0443\u0436\u043d\u043e\u0435 \u043c\u0435\u0441\u0442\u043e \u0434\u043b\u044f \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f<\/li>\n<li>\u041c\u043e\u0434\u0443\u043b\u0438 \u043e\u0431\u0449\u0430\u044e\u0442\u0441\u044f \u043f\u043e \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c \u0441\u043e\u0431\u044b\u0442\u0438\u0439. \u041c\u043e\u0436\u043d\u043e \u0443\u0434\u0430\u043b\u044f\u0442\u044c \u0438\u043b\u0438 \u0437\u0430\u043c\u0435\u043d\u044f\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u0438 \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u043d\u0435 \u0442\u0440\u043e\u0433\u0430\u044f \u043a\u043e\u0434 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f<\/li>\n<li>\u041f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u043d\u0435\u0441\u0435\u043d\u0438\u044f \u043d\u043e\u0432\u044b\u0445 \u0444\u0438\u0447 \u0441\u0442\u0430\u043b \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b\u043c<\/li>\n<\/ul>\n<p>  \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043d\u043e\u0432\u044b\u0439 \u043c\u043e\u0434\u0443\u043b\u044c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0447\u0442\u043e \u0442\u043e \u0434\u0435\u043b\u0430\u0435\u0442 \u043f\u043e\u0441\u043b\u0435 \u0442\u043e\u0433\u043e, \u043a\u0430\u043a \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u044b\u0431\u0440\u0430\u043b \u043f\u0443\u043d\u043a\u0442 \u0432 \u043f\u0440\u043e\u0444\u0438\u043b\u0435. \u041d\u0430\u043c \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u044d\u0442\u043e\u0442 \u043c\u043e\u0434\u0443\u043b\u044c \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &#8216;clickItem&#8217; \u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0443\u0436\u043d\u044b\u0435 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f.<\/p>\n<p>  \u041c\u044b \u0445\u043e\u0442\u0438\u043c \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0435\u0435 \u043e\u043a\u043d\u043e, \u043f\u043e\u044f\u0432\u043b\u044f\u044e\u0449\u0435\u0435\u0441\u044f \u043f\u0440\u0438 \u043a\u043b\u0438\u043a\u0435 \u043d\u0430 \u0440\u0430\u0431\u043e\u0442\u0435 \u0432 \u043f\u043e\u0440\u0442\u0444\u043e\u043b\u0438\u043e? \u041d\u0435 \u0432\u043e\u043f\u0440\u043e\u0441. \u0412 \u043c\u0435\u0442\u043e\u0434\u0435 event \u043c\u043e\u0434\u0443\u043b\u044f Portfolio \u0434\u043e\u0431\u0430\u0432\u0438\u043c \u043d\u0435\u0447\u0442\u043e \u0432\u0440\u043e\u0434\u0435  <\/p>\n<pre><code class=\"javascript\">\/\/'.portfolio-item' - \u043a\u043b\u0430\u0441\u0441-\u043e\u0431\u0435\u0440\u0442\u043a\u0430, \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b $('.portfolio-item').click(function(){ \t$(window).trigger('showModal'); }); <\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0434\u043f\u0438\u0441\u0430\u0442\u044c \u043c\u043e\u0434\u0443\u043b\u044c, \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u044e\u0449\u0438\u0439 \u0432\u0441\u043f\u043b\u044b\u0432\u0430\u044e\u0449\u0438\u0435 \u043e\u043a\u043d\u0430, \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043d\u0430\u0448\u0435\u043c\u0443 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044e \u2014 \u043d\u0430 \u0441\u043e\u0431\u044b\u0442\u0438\u0435 &#8216;showModal&#8217; \u0438 \u0432\u0441\u0435.<\/p>\n<p>  \u041d\u0430\u0434\u0435\u044e\u0441\u044c \u044d\u0442\u043e\u0442 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u0431\u0443\u0434\u0435\u0442 \u0432\u0430\u043c \u043f\u043e\u043b\u0435\u0437\u0435\u043d.<\/p>\n<p>  \u041f\u043e \u0442\u0435\u043c\u0435 \u0442\u0430\u043a \u0436\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"http:\/\/largescalejs.ru\/\">largescalejs.ru<\/a>.<\/p>\n<p>  \u0414\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0444\u0430\u0439\u043b\u043e\u0432 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e <a href=\"http:\/\/yepnopejs.com\/\">yepnope.js<\/a>.<\/p>\n<p>  \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0437\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435. \t\t\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\/218485\/\"> http:\/\/habrahabr.ru\/post\/218485\/<\/a><br \/><\/br><\/br><\/div>\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-218485","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/218485","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=218485"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/218485\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=218485"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=218485"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=218485"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}