Controlgroup: Improve comments and remove a misleading blank line

This commit is contained in:
Jörn Zaefferer 2015-09-30 15:42:33 +02:00 committed by Alexander Schmitz
parent 6fc2cb3c7c
commit 256a449213

View File

@ -80,15 +80,14 @@ return $.widget( "ui.controlgroup", {
// Make sure the widget actually exists and has a selector set // Make sure the widget actually exists and has a selector set
if ( $.fn[ widget ] && selector ) { if ( $.fn[ widget ] && selector ) {
// Find instances of this widget inside controlgroup init them // Find instances of this widget inside controlgroup and init them
widgets = that.element.find( selector )[ widget ]( options ); widgets = that.element.find( selector )[ widget ]( options );
widgets.each( function() { widgets.each( function() {
var element = $( this ); var element = $( this );
// Store an instance of the controlgroup to be able to refrence // Store an instance of the controlgroup to be able to reference it later
var widgetElement = element[ widget ]( "widget" ); var widgetElement = element[ widget ]( "widget" );
widgetElement.data( widgetElement.data(
"ui-controlgroup-data", "ui-controlgroup-data",
element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) ) element.data( "ui-" + widget.charAt( 0 ).toUpperCase() + widget.slice( 1 ) )