New at Jquery please help......
Im trying to make a drop menu that drop on click and return on click.
the code looks like this ::
$(document).ready(function(){
$("a.ic").click(function(){
$(this).parents("div.closed").removeClass("closed").addClass("open");
$(this).removeClass("ic").hide();
$(this).addClass("io").show();
return false;
});
$("a.io").click(function(){
$(this).parents("div.open").removeClass("open").addClass("closed");
$(this).removeClass("io").hide()
$(this).addClass("ic").show();
return false;
});
XHTML's like this::
<div id="menu">
<div class="closed"><a href="#" class="ic">aaa</a></div>
<div class="closed"><a href="#" class="ic">bb</a></div>
<div class="open"><a href="#" class="io">cc</a></div>
</div>
Im think im running into trouble because im using two click functions but could be the syntax...im really not sure. can anyone out there
please read my code and let me know... HELP ME
thankyou very much!!!
q