you have missed the href:
Standard, To use window.location.href as window.location is technically an object containing:
Properties
hash
host
hostname
href <--- you need this
pathname (relative to the host)
port
protocol
search
try
window.location.href = $link.attr('data-href');