I have a div which contains settings and options on an account management page.
$(\"#moreOptions\").slideToggle(\'slow\'); if ($(\"#moreOptions\").is(\":visible\
I think this code will work
$('#element').toggle('slow', function() { if($(this).is(':hidden')) { $(this).text('This element is hidden.'); } else { $(this).text('This element is visible.'); } });