JavaScript Style Guide

Linting Spacing Bad Examples Good Examples Object and Array Expressions Multi-line Statements Chained Method Calls Full File Closures Constructors Equality Type Checks Comments Quotes Semicolons Naming Conventions Global Variables DOM Node Rules Switch Statements link LintingUse JSHint to detect errors and potential problems. Every jQuery project has a Grunt task for linting all JavaScript files: … Continue reading

Markup Conventions for jQuery Foundation Sites

All of the sites that are part of the jQuery WordPress network use the following markup conventions to apply styling to elements. Please adhere to these conventions if you are working on any of our web sites. This page is a live example of these conventions in action. Tools & Libraries The jQuery sites are … Continue reading

Contributing to jQuery Foundation Web Sites

Just like our JavaScript libraries, we maintain the design and content of all our websites in the open, with everything available on GitHub. We do this for several reasons: It works for code. Open source development is collaborative, auditable, and decentralized — all qualities that should be part of working on design and documentation as … Continue reading

Supporting Other Users

With millions of jQuery users all over the world, there's always someone out there who needs a helping hand. Like many open source projects, the jQuery Foundation relies on community support channels like forums, IRC, and StackOverflow. Helping out with support is one of the best first steps you can take to get involved in … Continue reading

How to Report Bugs

link Before You Reportlink Make Sure It's a jQuery BugMany bugs reported to our bug trackers are actually bugs in user code, not in jQuery code. Keep in mind that just because your code throws an error and the console points to a line number inside of a jQuery project, this does not mean the … Continue reading

Prose Style Guide

link Formatting ConventionsOn many sites, prose (sites, README, docs, etc) is authored with GitHub Flavored Markdown. Some sites (e.g. api.jquery.com) use an XML-based markup system but the advice offered here for good writing still applies. link Writing StyleContent should be educational and accessible to a broad audience of developers. The primary target audience is beginning … Continue reading

HTML Style Guide

Linting Spacing Formatting HTML Semantics Reducing Markup Separation of Concerns Forms Comments This page outlines the style guide for HTML pages in all jQuery projects. These rules apply to web sites, demo pages, inline examples, test pages, etc. Exceptions are allowed for pages that must violate the rules by their very nature, e.g., a page … Continue reading