#Vanilla JavaScript useful variables (almost jQuery)
Tests: JSBin
Test 1: 1 element (ID)
$('#hola').style.color = 'red';
Test 2: 2 elements (selector)
$$('p').forEach(function(elems){
elems.style.color = 'blue';
});
Test 3: 2 elements (classes)
$$('.paragraph').forEach(function(elems){
elems.style.fontWeight = 'bold';
});
Test 4: 1 element (ID), bind 'click' event
$('#hola').on('click',function(ev){
this.style.color = 'green';
});
Test 5: 2 elements (classes), bind 'click' event
$$('.paragraph').on('click',function(ev){
this.style.color = 'yellow';
});
Thnx to bling.js & other repos.