Take the 2-minute tour ×  This is the HTML I'm working with:
<ul id="categories">   <li><a href="#cargo">Cargo
Trailers</a></li>   <div class="dropdown">       <li><a
href="#utility">Utility Trailers</a></li>  I have written a
jQuery script to hide the dropdown div. The dropdown div appears
the first time the click event is fired. Once the li in the
dropdown div is selected and switches places with the first li
in the #categories ul, clicking on the li will not bring up the
dropdown div.  Here is the jQuery:
jQuery(document).ready(function($) {  // hide the dropdown div
$('#categories > div').hide();      Click the drop down arrow
function var $listHeader = $('#categories > li');
$listHeader.click(function() {        if ( $('#categories >
div:hidden') ) {         //show the drop down
$('#categories > div').show();     } else {         //hide the
drop down      Click a list-item in the drop down function
$('#categories > div a').click(function() {      /* actions to
change the title to the newly sel