Skip to content

Conversation

@ptim
Copy link
Contributor

@ptim ptim commented Oct 5, 2017

I didn't readily find instructions for using jquery in the browser - hopefully this helps!
(not creating a topic branch as it's a docs PR stright from GH.. is that okay?)

I didn't readily find instructions - maybe this helps!
Copy link
Member

@novemberborn novemberborn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR @ptim!

(not creating a topic branch as it's a docs PR stright from GH.. is that okay?)

Yes that's fine. The branch name really doesn't matter, it's in your fork anyway.

browserEnv(['window', 'document', 'navigator']);
```

If your components use jQuery, you can make it available like so:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if you could rephrase this a little. What's interesting is that you're adding additional global variables. jQuery could be an example of that:

You can expose more global variables by assigning them to the global object. For instance jQuery is typically available through the $ variable:

refer to jquery as an example of the more general case :)
@ptim
Copy link
Contributor Author

ptim commented Oct 11, 2017

Thanks for the feedback @novemberborn! Your phrasing gives much more context - thanks!

@sindresorhus sindresorhus changed the title Instructions for making jQuery available in browser Recipe instructions for making jQuery available in browser Oct 15, 2017
@sindresorhus sindresorhus merged commit f43d5ae into avajs:master Oct 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants