-
Notifications
You must be signed in to change notification settings - Fork 481
Decide on one consistent way of referring to functions #291
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
Comments
We have a couple rules already in http://learn.jquery.com/style-guide/ in the Code within Prose section. Most of the examples you mention are covered by them. The rules may inform whether some inconsistency currently exists. There may also be a missing guideline, but we should start with what we have and see what isn't sufficiently covered by it. Specific examples would help. |
Yes, I must have glossed over that part a bit too quickly… the only part that is not covered, I guess, is whether to use |
The last guideline in that list covers method on the jQuery prototype. Always simply .functionName() An exception would be if it was instruction about how it is stored on the prototype, what it's called and what that looks like. I'll let @ajpiano and/or @kswedberg weight in on jQuery vs. $ |
@rdworth Would that mean that all occurrences of |
@alimony My understanding is as follows:
|
@rmurphey has it right. Sorry I forgot to clarify the diff between |
Feel free to close this issue; @rmurphey's clear points may or may not have a place in the style guidelines, but that is not for me to decide. |
👍 to @rmurphey's points/clarification. That's the way we refer to things in the API documentation, at least. Unless @ajpiano objects, we should probably update the learn.jquery.com style guide to cover methods of the jQuery object such as |
I will have a pull request shortly that cleans up the current content where |
+1 to @rmurphey's suggestion as well. We should amend the style guide and then we can close this issue |
This is already documented on http://learn.jquery.com/style-guide/#code-within-prose |
The various pages currently use:
jQuery.functionName()
jQuery.fn.functionName()
$.functionName()
$.fn.functionName()
.functionName()
functionName()
.functionName
functionName
There should be an easy rule for the format when mentioning functions in body text (i.e. outside code blocks) and all pages should conform to that rule. Should probably go into the style guidelines as well.
The text was updated successfully, but these errors were encountered: