Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jQuery UI 1.8.13 sudden error

Tags:

jquery-ui

We have been using Jquery from this link http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js for drag and drop. Suddenly we notice it is not working now and there is no code change done our side. We notice the error is pointing to these line and error is TypeError: a.curCSS is not a function? What will be solution to this problem?

e&&e.call(i)},g)}):this._focus.apply(this,arguments)},scrollParent:function(){var g;g=a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?this.parents().filter
like image 263
user837306 Avatar asked Aug 21 '12 03:08

user837306


3 Answers

This javascript error is caused by jQuery and jQueryUI being out of sync with each other. Rather than go back to an older version of jQuery, I would update jQuery UI. This link from the jQueryUI blog talks about support for the latest version jQuery. I experienced the same error before updating jQuery UI.

like image 55
Eric Brenden Avatar answered Nov 13 '22 11:11

Eric Brenden


Base on another answer... I did something slightly different...

Instead of replacing:

$.curCSS(element, attrib, val);

with:

$(element).css(attrib, val);

I created a new function:

$.curCSS = function (element, attrib, val) {
    $(element).css(attrib, val);
};
like image 21
Johann Chaves Saborío Avatar answered Nov 13 '22 11:11

Johann Chaves Saborío


$.curCSS: This method is simply an alias for jQuery.css() from jQuery 1.3 onward. Although it has never been part of the documented API, some external code has been known to use it, perhaps thinking it was “more efficient.” Now it’s “more gone.” - from the page here.

This error can occur by using curCSS also.

replace:

$.curCSS(element, attrib, val);

with

$(element).css(attrib, val);
like image 13
ProfBoob Avatar answered Nov 13 '22 11:11

ProfBoob