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.

$(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 list',
rather than 'preview more comments' the whole time. i've read some
stuff on traversal methods here: 
http://docs.jquery.com/Tutorials:How_to_Get_Anything_You_Want
but nothing on changing XHTML attributes.

hope that makes sense. thanking anyone brave enough to help in
advance!
lewis

Reply via email to