JavaScript not working, wondering how to fix
<p>Wondering how I could fix this js to work correctly. I'm hiding a section to show another and also disabling the hours textboxes if the "off?" checkbox is checked. the hide/show/disable portion works, but the timepicker doesn't work. I'm trying to figure out why it's not working before I try to add the datepicker part of the coding...</p>

<p>Anyways, here is my code for the portion I am referring to...</p>

<pre><code>    &lt;link rel="stylesheet" type="text/css" href="includes/css/adm.css" /&gt;
&lt;script type="text/javascript" src="http://code.jquery.com/jquery-1.9.0.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="http://code.jquery.com/ui/1.10.0/jquery-ui.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="includes/js/timepicker.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript" src="jquery-ui-sliderAccess.js"&gt;&lt;/script&gt;

&lt;script&gt;
$("#tstart").timepicker({
timeFormat: "hh:mm tt",
stepMinute: 15,
minuteGrid: 15,
hourMin: 6,
hourMax: 16
});
&lt;/script&gt;

&lt;script&gt;
$("#tend").timepicker({
timeFormat: "hh:mm tt",
stepMinute: 15,
minuteGrid: 15,
hourMin: 11,
hourMax: 23
});
&lt;/script&gt;

&lt;script type="text/javascript"&gt; 
function fields(){ 
    if (document.getElementById('working').checked == 1){ 
    document.getElementById('tstart').disabled='disabled'; 
    document.getElementById('tend').disabled='disabled'; 
    document.getElementById('type').style.display = 'none';
    document.getElementById('type').style.visibility = 'hidden';
    document.getElementById('off').style.display = 'inline'; 
    document.getElementById('off').style.visibility = 'visible';
    }else{ 
    document.getElementById('tstart').disabled=''; 
    document.getElementById('tend').disabled=''; 
    document.getElementById('type').style.display = 'inline';
    document.getElementById('type').style.visibility = 'visible';
    document.getElementById('off').style.display = 'none'; 
    document.getElementById('off').style.visibility = 'hidden';
    }
}
&lt;/script&gt;

&lt;td class="add_hours_left_top"&gt;Date:&amp;nbsp;&lt;/td&gt;
                &lt;td class="add_hours_right_top"&gt;
                    &lt;input type="text" name="date" id="date" size="22" value=""&gt;
                    &lt;input type="hidden" name="work" value="0"&gt;
                    &lt;input type="checkbox" title="Check if off work!" name="work" id="working" value="1" onclick="fields();" /&gt;Off?
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td class="add_hours_left"&gt;Hours:&amp;nbsp;&lt;/td&gt;
                &lt;td class="add_hours_right"&gt;
                    &lt;input type="text" name="timestart" id="tstart" size="10" value=""&gt; to 
                    &lt;input type="text" name="timeend" id="tend" size="10" value=""&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td class="add_hours_reason_select" colspan="2" id="type"&gt;
                    &lt;div class="add_hours_type_name"&gt;Type of work to be done:&lt;/div&gt;
                    &lt;input type="hidden" name="work_type" value="0" checked /&gt;
                    Temps &lt;input type="radio" name="work_type" value="1" /&gt;&lt;b&gt;&amp;middot;&lt;/b&gt;&amp;nbsp;
                    Scrub Floors &lt;input type="radio" name="work_type" value="2"/&gt;&lt;/br&gt;
                    Leave Early or Later &lt;input type="radio" name="work_type" value="3"/&gt;&lt;b&gt;&amp;middot;&lt;/b&gt;&amp;nbsp;
                    Training &lt;input type="radio" name="work_type" value="4"/&gt;&lt;/br&gt;
                    &lt;/label&gt;
                &lt;/td&gt;
            &lt;/tr&gt;
            &lt;tr&gt;
                &lt;td class="add_hours_reason_select" colspan="2" id="off" style="display:none;"&gt;
                &lt;div class="add_hours_type_name"&gt;Reason off work:&lt;/div&gt;
                    &lt;input type="hidden" name="why_off" value="0" checked /&gt;
                    Request &lt;input type="radio" name="why_off" value="1" /&gt;&lt;b&gt;&amp;middot;&lt;/b&gt;&amp;nbsp;
                    Medical Leave &lt;input type="radio" name="why_off" value="2"/&gt;&lt;/br&gt;
                    &lt;/label&gt;
                &lt;/td&gt;
</code></pre>

<p>Thanks for the help!</p>
