(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
;(function () { | |
function domReady (f) { /in/.test(document.readyState) ? setTimeout(domReady,16,f) : f() } | |
function resize (event) { | |
event.target.style.height = 'auto'; | |
event.target.style.height = event.target.scrollHeight+'px'; | |
} | |
/* 0-timeout to get the already changed text */ | |
function delayedResize (event) { | |
window.setTimeout(resize, 0, event); |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
/** | |
* Работаем с классами у SVG-элементов | |
* Код добавляет возможность использовать следующие функции: | |
* hasClass, addClass, removeClass, toggleClass | |
* | |
* Использование: | |
* var svgEl = document.querySelector('.svg-selector'); | |
* svgEl.hasClass('className'); // hasClass | |
* svgEl.addClass('className'); // addClass | |
* svgEl.removeClass('className'); // removeClass |
В гисте план правильного создания формы и моменты, на которых спотыкаются незнакомые с компонентом разработчики