Skip to content

Add a new category for "Common Mistakes and Workarounds" #98

Open
@ajpiano

Description

@ajpiano

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions