jquery / jquery/api.jquery.com

Slide transitions can misjudge final dimensions - workaround should be documented

Open
#311 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted
Dominant language
HTML
Stars
325
Forks
260
PR merge metrics
No merged PRs in 30d

Description

Sometimes slideDown, slideUp and slideToggle events can misjudge the final dimensions of the page, and hence slide the element too far or not far enough - leading to a "jump" into the correct position at the end of the slide transition.

This can be worked around by an explicit height or width specification on the element in question, and it would be helpful if that workaround was documented on these methods.

Some references:
http://www.bennadel.com/blog/2263-Use-jQuery-s-SlideDown-With-Fixed-Width-Elements-To-Prevent-Jumping.htm
(note that the width doesn't actually need to be fixed - any specified width will probably work; the explanation is helpful though)
http://forum.jquery.com/topic/slidedown-goes-to-far-then-jumps-back

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the API documentation for the slideDown, slideUp, and slideToggle methods. Review the linked references for the documented workaround, then update the relevant method pages to explain that specifying an explicit height or width can prevent the transition from jumping. Done means the workaround is clearly documented for these methods.

Written by the indexing model from the issue text.

Assessment

Tech stack
jquery
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.