optimize get elements in specify parentNode