assets/bower_components/jquery-ui/ui/widget.js in catscope-0.0.3 vs assets/bower_components/jquery-ui/ui/widget.js in catscope-0.1.0

- old
+ new

@@ -1,10 +1,10 @@ /*! - * jQuery UI Widget 1.11.2 + * jQuery UI Widget 1.11.4 * http://jqueryui.com * - * Copyright 2014 jQuery Foundation and other contributors + * Copyright jQuery Foundation and other contributors * Released under the MIT license. * http://jquery.org/license * * http://api.jqueryui.com/jQuery.widget/ */ @@ -188,15 +188,10 @@ $.fn[ name ] = function( options ) { var isMethodCall = typeof options === "string", args = widget_slice.call( arguments, 1 ), returnValue = this; - // allow multiple hashes to be passed on init - options = !isMethodCall && args.length ? - $.widget.extend.apply( null, [ options ].concat(args) ) : - options; - if ( isMethodCall ) { this.each(function() { var methodValue, instance = $.data( this, fullName ); if ( options === "instance" ) { @@ -217,9 +212,15 @@ methodValue; return false; } }); } else { + + // Allow multiple hashes to be passed on init + if ( args.length ) { + options = $.widget.extend.apply( null, [ options ].concat(args) ); + } + this.each(function() { var instance = $.data( this, fullName ); if ( instance ) { instance.option( options || {} ); if ( instance._init ) {