Document safe way to access the information of an element with a widget bound to it #77

Closed
FagnerMartinsBrack opened this Issue Dec 13, 2012 · 5 comments

Comments

Projects
None yet
4 participants
@FagnerMartinsBrack

As discussed on http://bugs.jqueryui.com/ticket/8908, element.is( ":data(namespace-widget)" ) should be documented as a safe way to detect if a widget is being used in a given element.

Suggestion 1: It can be written under "Additional Notes" of each component like "Detect if the widget is active on the element: $( ".selector" ).is( ":data(namespace-widget)" )"

Suggestion 2: It can be written along with the destroy() method in Code examples: like:

Code Examples:
Detect if the widget is active on the element:
$( ".selector" ).is( ":data(namespace-widget)" );

@tjvantoll

This comment has been minimized.

Show comment
Hide comment
@tjvantoll

tjvantoll Feb 15, 2013

Member

This is likely going to be addressed by jquery/jquery-ui#902.

Member

tjvantoll commented Feb 15, 2013

This is likely going to be addressed by jquery/jquery-ui#902.

@scottgonzalez

This comment has been minimized.

Show comment
Hide comment
@scottgonzalez

scottgonzalez Feb 15, 2013

Member

Yup, but for old versions, we should document the selector approach.

Member

scottgonzalez commented Feb 15, 2013

Yup, but for old versions, we should document the selector approach.

@tjvantoll

This comment has been minimized.

Show comment
Hide comment
@tjvantoll

tjvantoll Feb 21, 2013

Member

A section about this was added in the widget's factory's docs, but we still want something on the individual widget's pages. Reopening this so I remember to do that.

Member

tjvantoll commented Feb 21, 2013

A section about this was added in the widget's factory's docs, but we still want something on the individual widget's pages. Reopening this so I remember to do that.

@jzaefferer

This comment has been minimized.

Show comment
Hide comment
@jzaefferer

jzaefferer Mar 19, 2013

Member

Once the instance method landed, we also need to update the new Instance section.

Member

jzaefferer commented Mar 19, 2013

Once the instance method landed, we also need to update the new Instance section.

@tjvantoll

This comment has been minimized.

Show comment
Hide comment
@tjvantoll

tjvantoll Mar 20, 2013

Member

@jzaefferer See #114.

I think that pull covers most of this issue. The one thing remaining is we don't have a means of determining whether an element has a given widget bound to it documented on each widget's page as the OP suggested. Currently it's only documented on the widget factory's main API page.

Member

tjvantoll commented Mar 20, 2013

@jzaefferer See #114.

I think that pull covers most of this issue. The one thing remaining is we don't have a means of determining whether an element has a given widget bound to it documented on each widget's page as the OP suggested. Currently it's only documented on the widget factory's main API page.

tjvantoll added a commit to tjvantoll/api.jqueryui.com that referenced this issue Mar 22, 2013

@tjvantoll tjvantoll closed this in cde5d57 Mar 26, 2013

scottgonzalez added a commit that referenced this issue Apr 2, 2013

Revert "jQuery.widget: Document that instance can be called on any el…
…ement to determine whether it is a widget. Fixes #77."

This reverts commit cde5d57.

scottgonzalez added a commit that referenced this issue Apr 2, 2013

Revert "Revert "jQuery.widget: Document that instance can be called o…
…n any element to determine whether it is a widget. Fixes #77.""

This reverts commit 404a476.

scottgonzalez added a commit that referenced this issue Nov 27, 2013

Revert "Revert "jQuery.widget: Document that instance can be called o…
…n any element to determine whether it is a widget. Fixes #77.""

This reverts commit 404a476.

scottgonzalez added a commit that referenced this issue Nov 27, 2013

Revert "Revert "jQuery.widget: Document that instance can be called o…
…n any element to determine whether it is a widget. Fixes #77.""

This reverts commit 404a476.

scottgonzalez added a commit that referenced this issue Dec 5, 2013

Revert "Revert "jQuery.widget: Document that instance can be called o…
…n any element to determine whether it is a widget. Fixes #77.""

This reverts commit 404a476.

scottgonzalez added a commit that referenced this issue Dec 12, 2013

Revert "Revert "jQuery.widget: Document that instance can be called o…
…n any element to determine whether it is a widget. Fixes #77.""

This reverts commit 404a476.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment