Skip to content

Commit

Permalink
fix(content-switcher): fix markdown in readme (#36)
Browse files Browse the repository at this point in the history
Wasn't rendering correctly on website
  • Loading branch information
hellobrian authored and marijohannessen committed Apr 25, 2017
1 parent 454b47a commit 92171ed
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/content-switcher/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,14 @@ const instance = ContentSwitcher.init();
instance.setActive(button);
```

> The `setActive` method also takes an optional `callback` function parameter. The most typical example of using this is acting on a newly selected content-switcher button.
> ```js
> contentSwitcher.setActive(button, function (error, item) {
> if (!error) {
> // Having no error means that content switching is not canceled, so go on…
> item.ownerDocument.querySelector(item.dataset.target).querySelector('input').focus(); // `item` is the newly selected button
> }
>});
The `setActive` method also takes an optional `callback` function parameter. The most typical example of using this is acting on a newly selected content-switcher button.
```js
contentSwitcher.setActive(button, function (error, item) {
if (!error) {
// Having no error means that content switching is not canceled, so go on…
item.ownerDocument.querySelector(item.dataset.target).querySelector('input').focus(); // `item` is the newly selected button
}
});
```

#### Using buttons or anchor elements are both fine
Expand Down

0 comments on commit 92171ed

Please sign in to comment.