Forums

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

Home Forums CSS Animating textarea

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #254657
    Ollie_w
    Participant

    I tried to use jQuery slide() on a textarea element and it looked glitchy/janky so I tried to animate max-height. For some reason applying max-height: 0 !important reduces the height of the element but doesn’t bring it down to 0 – you can still see some of it.
    I’ve removed the rows= attribute from the HTML on the element but the jQuery slide effect still looks really bad.

    #254662
    stancevicbranko
    Participant

    Hey,

    Just put display:none on textarea, because calculations of height are done by jquery, and on textarea call slide or slideToggle (see difference on following api link) function from jquery. That should do job for you.

    jquery api documentation – great site for showing jquerys capabilities.

    #254758
    processprocess
    Participant

    Why not use CSS transforms? Can we see a reduced Codepen demo?

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