html += '<a id="linkToFoo">...</a>';
...
$('#divToAugment').append(html);
...
$('#linkToFoo').click(function() {
window.location = '/foo/bar.html';
});
Hint: If all you want to do is make an 'a' tag clickable and have it take you to another URL, there's a much easier way...
No comments:
Post a Comment