I have a modal box in jQuery which I have created to display some embed code. I want the script to take the id of the link that is clicked but I can\'t
id
var answerid = $('.openembed').attr('id');
needs to be
var answerid = $(this).prop('id');