jQuery追放作業用の備忘録です。
NG:不明
title取得
$(el).attr('title');
↓
el.title;
outerWidth
$(el).outerWidth();
↓
el.offsetWidth
outerHeight
$(el).outerHeight();
↓
el.offsetHeight
style設定
$(el).css('border-width', '20px');
↓
el.style.borderWidth = '20px';
NG:IE8
子供をeach
$(el).chidlren().each(function(index, element){
// do anything...
});
↓
Array.prototype.forEach.call(el.children, function(element, index){
// do anything...
});
next
$(el).next();
↓
el.nextElementSibling
prev
$(el).prev();
↓
el.previousElementSibling
NG:IE9
hasClass
$(el).hasClass(className);
↓
el.classList.contains(className);