hey all, wondering if anyone could help with this...
i have two jquery functions that act independently on two separate columns of text in my webpage. a live example of the webpage is here: http://www.personal.leeds.ac.uk/~scs4ll/ with the code below working with the <b>articles > 'preview more articles'</b> and <b>comments > 'preview more comments'</b> button's respectively. $(document).ready(function() { $("#articles .view_more").toggle(function() { $("#articles .bullet_text").addClass("bullet_text_go"); } , function() { $("#articles .bullet_text").removeClass("bullet_text_go"); } ); } ); $(document).ready(function() { $("#comments .view_more").toggle(function() { $ ("#comments .bullet_text").addClass("bullet_text_go").slideDown('slow'); } , function() { $ ("#comments .bullet_text").removeClass("bullet_text_go").slideUp('slow'); } ); } ); as you will see both buttons, when clicked, add a new class with a greater height (height:100%), displaying the remainder of the columns content. now my problem is i would like to amend the functionality slightly and i'm at a loss as how to do it. 1) i would like the slideUp/Down fluidity, but without the removeClass function hiding all my comments on the second click 2) i would also like to amend the function so when the button is clicked, in it's lowered state - revealing ALL content, to have the value of the button changed to something like 'retract comments', rather than 'preview more comments' the whole time. thanking anyone brave enough to help in advance! lewis