load function works once only

load function works once only

I've gotten this code to work the first time that the user changes the select option:

  1. $('select.third, select.fourth').change(function(event){
  2. var id = $(this).siblings('.hidden').text(),
  3. token = $('#token').val();
  4. param = $(this).hasClass('third') ? 'isSold' : 'isActive';
  5. value = $(this).val();
  6. $('div#allSheepDisplay').contents().remove().end().load(
  7. 'db-interaction/animals.php',
  8. {
  9. action: 'update',
  10. id: id,
  11. token: token,
  12. param: param,
  13. value: value
  14. },
  15. function() {
  16. $('select.third').filter(function(){return $(this).val() == '1'; }).css({backgroundColor: 'yellow'});
  17. $('select.fourth').filter(function(){return $(this).val() == '0'; }).css({backgroundColor: 'red'});
  18. }
  19. );
  20. });
Everything works as I expect - the POST request is made correctly, the database is updated, and the display updates correctly. However, if I repeat the same action, selecting a different value, nothing happens until I refresh the page, at which time I can then make the change. Thoughts?