Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix plugins instantiation examples in Javascript docs #11545

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/pages/javascript.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,23 +44,23 @@ By default, Foundation is exported as [UMD modules](http://bob.yexley.net/umd-ja
For example with [ES6](https://github.com/lukehoban/es6features#readme) (the ESM format):
```js
import Foundation from 'foundation-sites';
const $dropdown = new Foundation.Dropdown('#mydropdown');
const $dropdown = new Foundation.Dropdown($('#mydropdown'));
// Or
import { Dropdown } from 'foundation-sites';
const $dropdown = new Dropdown('#mydropdown');
const $dropdown = new Dropdown($('#mydropdown'));
```

With [RequireJs](http://requirejs.org/) (the AMD format):
```js
define(['foundation'], function(Foundation) {
var $dropdown = new Foundation.Dropdown('#mydropdown');
var $dropdown = new Foundation.Dropdown($('#mydropdown'));
});
```

With [Node.js](https://www.safaribooksonline.com/library/view/learning-javascript-design/9781449334840/ch11s03.html) (the CommonJs format):
```js
var Foundation = require('foundation-sites');
var $dropdown = new Dropdown('#mydropdown');
var $dropdown = new Dropdown($('#mydropdown'));
```

#### Available formats
Expand Down