jQuery Mobile + UI: Uncaught TypeError (1.2.0 final relesed)
I have just updated jquery mobile js to 1.2.0 final version But it gives me error on one page. Below is the error
- Uncaught TypeError: Object function (name, prototype) {
- var namespace = name.split(".")[0];
- name = name.split(".")[1];
- // create plugin method
- $.fn[name] = function(options) {
- var isMethodCall = (typeof options == 'string'),
- args = Array.prototype.slice.call(arguments, 1);
- // prevent calls to internal methods
- if (isMethodCall && options.substring(0, 1) == '_') {
- return this;
- }
- // handle getter methods
- if (isMethodCall && getter(namespace, name, options, args)) {
- var instance = $.data(this[0], name);
- return (instance ? instance[options].apply(instance, args)
- : undefined);
- }
- // handle initialization and non-getter methods
- return this.each(function() {
- var instance = $.data(this, name);
- // constructor
- (!instance && !isMethodCall &&
- $.data(this, name, new $[namespace][name](this, options))._init());
- // method call
- (instance && isMethodCall && $.isFunction(instance[options]) &&
- instance[options].apply(instance, args));
- });
- };
- // create widget constructor
- $[namespace] = $[namespace] || {};
- $[namespace][name] = function(element, options) {
- var self = this;
- this.namespace = namespace;
- this.widgetName = name;
- this.widgetEventPrefix = $[namespace][name].eventPrefix || name;
- this.widgetBaseClass = namespace + '-' + name;
- this.options = $.extend({},
- $.widget.defaults,
- $[namespace][name].defaults,
- $.metadata && $.metadata.get(element)[name],
- options);
- this.element = $(element)
- .bind('setData.' + name, function(event, key, value) {
- if (event.target == element) {
- return self._setData(key, value);
- }
- })
- .bind('getData.' + name, function(event, key) {
- if (event.target == element) {
- return self._getData(key);
- }
- })
- .bind('remove', function() {
- return self.destroy();
- });
- };
- // add widget prototype
- $[namespace][name].prototype = $.extend({}, $.widget.prototype, prototype);
- // TODO: merge getter and getterSetter properties from widget prototype
- // and plugin prototype
- $[namespace][name].getterSetter = 'option';
- } has no method 'extend'
I have also tried to solved this problem after read on jquery mobile blog but i am not succeeded. I have also tried jQuery.noConflict() but it not works.
I know that the problem is because I have used jquery ui core js on the page where I got the error. I have tried to put that js before the jquery mobile js, the error is gone but page displays nothing. I have used jquery ui core js for progress bar.
somebody there who has solution of this problem?