jquery-ui/ui/core.js

70 lines
1.2 KiB
JavaScript
Raw Normal View History

/*!
2012-07-04 13:08:08 +00:00
* jQuery UI Core @VERSION
* http://jqueryui.com
2008-06-04 02:34:33 +00:00
*
* Copyright jQuery Foundation and other contributors
2012-08-09 14:13:24 +00:00
* Released under the MIT license.
* http://jquery.org/license
2008-06-04 02:34:33 +00:00
*
*/
//>>label: Core
//>>group: UI Core
//>>description: The core of jQuery UI, required for all interactions and widgets.
//>>docs: http://api.jqueryui.com/category/ui-core/
//>>demos: http://jqueryui.com/
2015-03-14 11:22:28 +00:00
( function( factory ) {
if ( typeof define === "function" && define.amd ) {
// AMD. Register as an anonymous module.
define( [
"jquery",
"./data",
"./disable-selection",
"./focusable",
"./form",
"./ie",
"./keycode",
"./labels",
"./jquery-1-7",
"./plugin",
"./safe-active-element",
"./safe-blur",
"./tabbable",
"./scroll-parent",
"./version"
], factory );
} else {
// Browser globals
factory( jQuery );
}
2015-03-14 11:22:28 +00:00
}( function( $ ) {
// plugins
2015-03-14 11:22:28 +00:00
$.fn.extend( {
2015-03-14 11:22:28 +00:00
uniqueId: ( function() {
var uuid = 0;
return function() {
2015-03-14 11:22:28 +00:00
return this.each( function() {
if ( !this.id ) {
this.id = "ui-id-" + ( ++uuid );
}
2015-03-14 11:22:28 +00:00
} );
};
2015-03-14 11:22:28 +00:00
} )(),
removeUniqueId: function() {
2015-03-14 11:22:28 +00:00
return this.each( function() {
if ( /^ui-id-\d+$/.test( this.id ) ) {
$( this ).removeAttr( "id" );
}
2015-03-14 11:22:28 +00:00
} );
}
2015-03-14 11:22:28 +00:00
} );
2015-03-14 11:22:28 +00:00
} ) );