function dropDownChange(el, id) { var div = $(id); if ($(id).is(":visible") == true) { $(id).hide(); $(el).addClass(''); } else { $(id).show(); $(el).addClass('long'); } }