I have a table row that when clicked opens a dialog. The class of the table row is either "associated" or "unassociated". I am trying to create the buttons for the dialog, but they will be different based on the class of clicked row.
$('#opps tr').click(function(){
var thisClass = $(this).attr('class');
$('#oppData').dialog({
width: dWidth,
height:dHeight,
modal:true,
buttons: {
//if thisClass == unassociated
"Submit":function(){ //do stuff }
// if thisClass == associated
"Do Other stuff":function(){}
}
});
});
how can i achieve this?