Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

curCSS method error in ASP.Net

I am getting an error while creating an autocomplete extender using jQuery. The error occurs at the second line.

function reduce(elem, size, border, margin) {
    $.each(side, function () { // error on this line
        size -= parseFloat($.curCSS(elem, "padding" + this, true))
        0;

        if (border) {
            size -= parseFloat($.curCSS(elem, "border" + this + "Width", true))
            0;
        } 
        if (margin) {
            size -= parseFloat($.curCSS(elem, "margin" + this, true))
            0;
        }
    }); 
    return size;
}
like image 257
sandeep Avatar asked Nov 01 '12 09:11

sandeep


1 Answers

From the jQuery 1.8.0 release notes:

$.curCSS: This method was 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."

Since you are using jQuery v1.8.2, the $.curCSS() function does not exist. You can use .css() instead.

like image 89
andyb Avatar answered Sep 27 '22 18:09

andyb