I have a jquery line of code that outputs some HTML to a div. Thing is, that HTML has some button tags which need an ID containing a javascript variable called postID.
$('#Message_' + postID).css('visibility','visible').html('').html('I need the buttons to have an ID with the postID variable!<br /><button type="button" id="remindMe_" + postID">Remind Me</button><button type="button" id="cancelMe" + postID">Cancel</button>').prependTo('#buttons_' + postID);
So the question is, how do I fix
.html('<button type="button" id="remindMe_" + postID">Remind Me</button>')
Like this:
That is, using exactly the same technique that you already used in this part: