Question: I have a script that loads a set of form controls based off of the selection made in a drop-down list. I load the elements from a php file in to a `div` using the following code: 

```
<script>
$(function() {
  $('#prompt_type').change(function() {
        switch ($( this ).find(":selected").text()) {           
            case 'Select': 
                $('#prompt_elements').load('index.php?path=promptelm&and_id=' + <?php echo $and->and_id; ?> + ' #type_select');
                break;                              
            case 'Radio':
                $('#prompt_elements').load('index.php?path=promptelm&and_id=' + <?php echo $and->and_id; ?> + ' #type_radio');          
                break;
            case 'Checkbox':

```

This part works great. My issue however is I am saving this information to a database and when I revisit the form even though my drop-down contains the correct value the elements are not loading unless I reselect the option to spark the `.change` event again. Is there a way to call my switch right after the drop-down is loaded?

Answer: 
I ran your mkcd function on bash 4.2.45 and linux 3.8.0 and it worked as expected. Logging on in a fresh window or running 

```
source ~/.bashrc 

```

in your existing window should define the function for you. If it does not work you'll get an error message like:

```
mkcd: command not found

```

While hek2mgl's suggestion is not necessary to make it work, it does make it make more sense since you're only going to cd to one directory.
As commented by Henk Langeveld and hek2mgl: "Wrong shell. Badly placed ()'s is a message produced by tcsh. Switch to bash or ksh."

I thought that opening a terminal on ubuntu entered straight into bash environment. In fact, as commented below, "a Terminal will start a copy of your login shell as defined in /etc/passwd". By typing `ps -p $$` in terminal, I realise mine is set to tcsh, the C shell. In that case, one needs to type `bash` to get into bash environment.

Then `source ~/.bashrc` compiles the definition for mkcd.