Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 14 lines (13 sloc) 0.975 kB
412128d @scottgonzalez Document core methods and selectors.
scottgonzalez authored
1 <?xml version="1.0"?>
2 <entry type="method" name="uniqueId" return="jQuery">
3 <title>.uniqueId()</title>
4 <desc>Generate and apply a unique id for the set of matched elements.</desc>
b3e4599 @scottgonzalez Added version info for .uniqueId() and .removeUniqueId().
scottgonzalez authored
5 <signature>
6 <added>1.9</added>
7 </signature>
412128d @scottgonzalez Document core methods and selectors.
scottgonzalez authored
8 <longdesc>
9 <p>Many widgets need to generate unique ids for elements. <code>.uniqueId()</code> will check if the element has an id, and if not, it will generate one and set it on the element. It is safe to call <code>.uniqueId()</code> on an element without checking if it already has an id. If/when the widget needs to clean up after itself, the <a href="/removeUniqueId"><code>.removeUniqueId()</code></a> method will remove the id from the element if it was added by <code>.uniqueId()</code> and leave the id alone if it was not. <code>.removeUniqueId()</code> is able to be smart about this because the generated ids have a prefix of <code>"ui-id-"</code>.</p>
10 </longdesc>
11 <category slug="methods"/>
5d571af @scottgonzalez Changed core cateogry to ui-core and added effects-core.
scottgonzalez authored
12 <category slug="ui-core"/>
412128d @scottgonzalez Document core methods and selectors.
scottgonzalez authored
13 </entry>
Something went wrong with that request. Please try again.