I\'m trying to select an id that changes on different posts of same page. So the they have been given an id=\"show_posts_{PostID}\" - on the final output the {PostID} is re
Two things.
To select an element with a given ID, you need a # character at the beginning of the ID.
#
Don't add the quotes to the beginning and end of the string.
Thus:
$('#show_posts_' + postId)