SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    jQuery slideUp / slideDown problem

    Hello

    I'm pretty new to jQuery, but I love it! Hower, I have a question...

    I am using the slideUp/slideDown functions in it, and resetting the content in between. It is a <p> tag, and the tag hides itself, i replace the content, then show it again. This works fine with small amounts of content, but when I put something that spans onto the next line in there, it doesn't expand to the whole height.. it just expands as though the <p> was still 1 line. Is there any way to get the slideDown function to realise that the tag has a new height, and use that instead?

    Page is here: http://chris.unigliding.co.uk/weatherjack/ (click 'Place Votes')

    Thanks all!

    Chris

  2. #2
    SitePoint Wizard silver trophybronze trophy Stormrider's Avatar
    Join Date
    Sep 2006
    Location
    Nottingham, UK
    Posts
    3,133
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have now solved this - for anyone else with a similar problem, you can 'reset' the height with:

    Code:
    this.style.height = 'auto';
    just before you call the slideDown function.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •