On Load and On Change

On Load and On Change

It's not something that's ever really come up before, but I'm re-creating a desktop application as a web-app and I'm coming across a number of places where:

1. A select box may be pre-filled with data from a database, and
2. Changing that select box affects the rest of the page.

I'm looking for a neat way to perform an action that could happen when the page loads, and/or when the select changes. Knowing my luck it's something stupidly easy.

For example, some code that is currently in progress:
  1. switch($('option:selected',$transaction).text()){ // On Load
  2.      case 'Comparable': case 'For Sale / To Let':
  3.          $.each($priceFields, function(){
  4.              $(this).addClass('short');
  5.          });

  6.         $.each($priceFieldsTwo, function(){
  7.             $(this).show();
  8.         });
  9.         break;
  10.     case 'For Sale':
  11.         console.log('2');
  12.         break;
  13.     case 'To Let':
  14.         console.log('4');
  15.         break;
  16. };
I'm looking for a way to perform this code on initial load, and then on change of the same select, without having to write it out twice.

I suppose I could write it as a seperate function each calls but that's not quite as neat as I'd like either as I'd still need three of them for this switch.

Any ideas?