Tuesday, 28 May 2013

How to put js link?

How to put js link?

I have link with jQuery post action:
$.post('my_url', {
    'pid': pid,
    'name': $('input#nametxt').val()
}, function(data){
    $('#list').append(data);
});
Respose from server is for example:
<li>My custom name <a href="javascript:add_another('23');">Add another</a></li>
But this dynamically added link not working. How to do it well?

No comments:

Post a Comment