I'm trying to reuse a function for a undetermined number of div blocks that have similar id' but only differ by which number it is. For some reason this function is not working when count is greater that 1. Can someone tell where I went wrong?
$(function() {
for (i=0; i < {{count}}; i++)
{
$('#popout-'+i).dialog({
autoOpen: false,
});
$("#apply_button_"+i).click(function() {
$("#popout-"+i).dialog("open");
});
}
});