Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Adusting the height of a div.

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #30696
    mshort1985
    Member

    Hey again everyone,

    just another quick jQuery question.

    I have made a div which I would like to beable to slide up and down, not all the way up, I don’t want to delete it, just reduce the size of it, and then increase the size when the button is pressed again. so far i have the following code, but am unsure how to make the same button reverse the action.

    $('a.down').click(function(){
    $(this).parent().animate({height: "300px"}, 1000);
    $(this).html('Minimize');
    });

    thanks very much :)

    #75372
    cybershot
    Participant

    you would use the animate function again to animate it -300px. I am guessing you want the button to raise it up and then lower it?

Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.