FAQ If Statement Problem
FAQ If Statement Problem
hello,
I have a simple FAQ show/hide function set up however i am having troubel setting up an if clause. my code is;
$(document).ready(function(){
$("dd").hide();
$("dt").click(function(){
$("dd").hide('slow');
$(this).next().slideToggle();
});
});
However, when you click on the same item twice it fistly hides and then reshows it,
i need an if statement that basically states;
if "this?!" is visible/shown
then do nothing
else
$("dd").hide('slow');
$(this).next().slideToggle();
I am unsure of the syntax and can't figure out what property i can trace out to see if the item is being shown or not.
any help with this is welcome, thank you