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

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

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

CSS Style Guide

This page outlines the style guide for CSS across all jQuery projects. link LintingUse CSSLint to detect errors and potential problems. Most jQuery projects have a Grunt task for linting all CSS files: grunt csslint. The options for CSSLint are stored in a .csslintrc file. Each .csslintrc file follows a specific format. All options must … Continue reading