Silly question I think, but is there a way to use the "if" statement as a reusable function
success: function(msg){
if(msg=='o'){
$j('#ok').show();
$j(button).show();
$j('#chk').hide();
}
else{
$j('#ok').hide();
$j('#chk').show();
$j(button).hide();
}
}
I have a number of times when I want to call it and I would rather have a "smaller" weight.