Can't get function to Trigger on Load

Can't get function to Trigger on Load

Have a select drop down with an ID country. This function works fine when the user selects the country from the drop down however I cant seem to get it to Trigger on load. am using Jquery 1.32 if this is useful? thanks for your help.


  1.     $("#country").bind("load change", function () {
  2.             var val = $(this).val();
  3.             switch(val){
  4.             case 'USA':
  5.                 $(".stateinput").hide();
  6.                 $(".territorydropdown").hide();
  7.                 $(".statedropdown").show();
  8.                 $(".stateinput input").attr({name: 'countystate_hidden', id:
  9. 'countystate_hidden'});
  10.                 $(".territorydropdown select").attr({name: 'countystate_hidden', id:
  11. 'countystate_hidden'});
  12.                 $(".statedropdown select").attr({name: 'countystate', id:
  13. 'countystate'}).addClass("required");
  14.                 break;
  15.             case 'CAN':
  16.                 $(".stateinput").hide();
  17.                 $(".statedropdown").hide();
  18.                 $(".territorydropdown").show();
  19.                 $(".stateinput input").attr({name: 'countystate_hidden', id:
  20. 'countystate_hidden'});
  21.                 $(".statedropdown select").attr({name: 'countystate_hidden', id:
  22. 'countystate_hidden'})
  23.                 $(".territorydropdown select").attr({name: 'countystate', id:
  24. 'countystate'}).addClass("required");
  25.                 break;
  26.             default:
  27.                 $(".statedropdown").hide();
  28.                 $(".territorydropdown").hide();
  29.                 $(".stateinput").show();
  30.                 $(".statedropdown select").attr({name: 'countystate_hidden', id:
  31. 'countystate_hidden'}).removeClass("required");
  32.                 $(".territorydropdown select").attr({name: 'countystate_hidden', id:
  33. 'countystate_hidden'});
  34.                 $(".stateinput input").attr({name: 'countystate', id: 'countystate'});
  35.                 break;
  36.             }
  37.         });