I am getting dynamic buttons from database the thing is,I want to use the value from the created button to fetch data,but when I click the button,on the value of the first button is passed even when i click a different button.here is my js code to get the button value.
function prodata1()
{
$(document).ready(function(){
$("#show").click(function(){
var show=$("#show").val();
$.ajax({
type:"post",
url:"assets/exec/compare-exec.php",
data:"show="+show,
success:function(data){
$("#link2").html(data);
}
});
});
});
}