2 ms·
I love how hn doesn't load 150 circus elements. I can reload pages all day long. I was just thinking..... function byId(id) { return document.getElemen
by gdewilde 12y ago
I love how hn doesn't load 150 circus elements. I can reload pages all day long.
I was just thinking.....
function byId(id) {
return document.getElementById(id);
}
// hide arrows
byId('up_' + item).style.visibility = 'hidden';
byId('down_' + item).style.visibility = 'hidden';
could be :
function hide(id) {
document.getElementById(id).style.visibility = 'hidden';
}
// hide arrows
hide('up_' + item);
hide('down_' + item);
Then it is 150 in stead of 185 chars, 19% smaller or 23% bigger.
And the function name is better of course.