I have a while loop in php that fetches results of a query (a user post) and displays the data from the query. However i also want two buttons at the bottom of every post. I need to know how to determine which div the button was clicked in and then display the results of an ajax function in that div only, thanks.
Share
You could simply try
So in var parent there’s the HTML Element that is the parent of your button(the specified div).