I have a table rows with a unique, where each row has a unique ID. However, sometimes that table is dynamically generated through AJAX.
I also have a button that is meant to update a particular table row bgcolor. But since that table row may be dynamically generated, it doesn't seem to work.
$("input[name=Save]").live("click", function(event){
//rowID comes from somewhere in the my script
$.ajax({
type: "POST",
url: "./Library/saveStff.php",
data: $("form").serialize(),
async: false,
dataType: "text",
success: function(value){
//value will return the color
//change color
$(".info_"+rowID).attr('bgcolor', value);
}
});
});
'live', 'on', 'bind' seems to work for events only. But I just want to apply it to a attr/bgcolor.
Using
$(".info_"+rowID).live("attr", $(this).('bgcolor', value));
also seem invalid.