jquery / jquery/api.jquery.com
Clarify .on() documentation for binding to elements that are removed and re-added.
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 325
- Forks
- 260
- PR merge metrics
- No merged PRs in 30d
Description
I see pretty regular confusion surrounding the notion that your binding breaks if the element you bound to was removed from the document (via, say, .remove()) and then re-added (like when you create a new element with $()).
Might be worthwhile to add in some language that explains why and how to resolve.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the .on() API documentation and review the existing explanation of bindings when elements are removed and later recreated with $(). Clarify why the binding no longer applies and describe how to resolve that situation. Done means the documented behavior and resolution address the reported confusion.
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
- Mostly clear
- Newbie friendliness
- 45/100