jquery / jquery/learn.jquery.com

Add a new category for "Common Mistakes and Workarounds"

Open
#98 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

content meta-discuss
Dominant language
JavaScript
Stars
915
Forks
471
PR merge metrics
No merged PRs in 30d

Description

Too many people are making the exact same mistakes and re-implementing the same anti-patterns. Borrow from fixingthesejquery.com and expand into articles so that these traps are well-documented canonically.

Some things that instantly leap to mind (let's expand this list) are:

  • Injecting malformed HTML in IE (never works)
  • Using HTML strings instead of actual manipulation methods to move things around the DOM (A lot of people who ask for an outerHTML solution need it because they're trying to do $("#bar").append( $("#foo").outerHTML() ) instead of the more practical $("#bar").append( $("#foo").clone() ) (or $("#foo").clone().appendTo("#bar")) (pretending for a second here that dupliateIDs are not a problem)... which leads me to...
  • Duplicate IDs

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 by reviewing the proposed mistakes and workarounds in the issue and the existing Learning Center content structure. Define the category and article scope before writing; done means the recurring traps are documented as canonical, practical articles with the examples in the issue covered.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
content, documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.