$('.hidden-link.basket').replaceWith(function(){
console.log('$(this).html()');
console.log($(this).html());
console.log('this.outerHTML');
console.log(this.outerHTML);
console.log('this.innerHTML');
console.log(this.innerHTML);
return '<a class="basket" href="' + $(this).data('link') + '">' + $(this).html() + '</a>';
});