use el.href instead of el.getAttribute('href')