Skip to content

Document $.widget.bridge() - Fixes #160 #173

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

Merged
merged 1 commit into from
Sep 6, 2013
Merged

Conversation

jzaefferer
Copy link
Member

No description provided.

@jzaefferer
Copy link
Member Author

The example I use is a bit silly, but I couldn't come up with anything better that also does something. The working example is here: http://jsbin.com/aGUvoXE/1/edit

<argument name="name" type="String">
<desc>The name of the plugin to create.</desc>
</argument>
<argument name="prototype" type="PlainObject">
Copy link
Member

Choose a reason for hiding this comment

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

This is actually a constructor, not a prototype.

@scottgonzalez
Copy link
Member

Should we make _init() optional?

<li><code>options</code>: an object of configuration options</li>
<li><code>element</code>: the DOM element this instance was created on</li>
</ul>
<p>You can then hook this object up as a jQuery plugin using the bridge and use it on any jQuery object:</p>
Copy link
Member

Choose a reason for hiding this comment

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

Should jQuery be in <code> blocks here?

Copy link
Member

Choose a reason for hiding this comment

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

We only use <code> around jQuery when referring to it as the function.

@jzaefferer
Copy link
Member Author

Updated

<argument name="name" type="String">
<desc>The name of the plugin to create.</desc>
</argument>
<argument name="constructor" type="PlainObject">
Copy link
Member

Choose a reason for hiding this comment

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

The type is function.

@jzaefferer
Copy link
Member Author

Should we make _init() optional?

👍

@jzaefferer
Copy link
Member Author

Updated again.

@jzaefferer jzaefferer merged commit 455fbe0 into master Sep 6, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants