Jquery Tag-it b.curCSS is not a valid function error
Asked Answered
A

4

18

http://marianoagency.com/intranet/trial.html

Everything works fine until I start typing any of the sample tags (like "php").

As soon as I hit "p" the b.curCSS script error pops up. The popup still works with the tags, but it is in the wrong place (top left 0,0).

What am I doing wrong?

Aftonag answered 19/9, 2012 at 15:34 Comment(0)
I
26

curCSS was removed from jQuery 1.8 and up, so you need to upgrade your jquery.ui. Looking at http://bugs.jqueryui.com/ticket/8501 you will see the issue.

Take a look at:

https://github.com/jquery/jquery-ui/commit/98772fd0a1094f7fb2fbe1d8a95557bf2b545f6e

If you can't upgrade your jQuery UI library, simply add this javascript after your jQuery file, before the jQuery UI file(s).

(function($) {
    if (!$.curCSS) {
       $.curCSS = $.css;
    }
})(jQuery);
Illustrious answered 19/9, 2012 at 15:43 Comment(1)
Didn't know that. Rolled Jquery back to 1.7.2 and it works flawlessly with UI 1.8.12. Thank you for insight.Aftonag
O
30

I fixed this error by including following line inside jQuery library

jQuery.curCSS = jQuery.css;
Outrange answered 27/2, 2013 at 18:16 Comment(1)
I wouldn't put that INSIDE jQuery, but the solution is good nonetheless.Unruh
I
26

curCSS was removed from jQuery 1.8 and up, so you need to upgrade your jquery.ui. Looking at http://bugs.jqueryui.com/ticket/8501 you will see the issue.

Take a look at:

https://github.com/jquery/jquery-ui/commit/98772fd0a1094f7fb2fbe1d8a95557bf2b545f6e

If you can't upgrade your jQuery UI library, simply add this javascript after your jQuery file, before the jQuery UI file(s).

(function($) {
    if (!$.curCSS) {
       $.curCSS = $.css;
    }
})(jQuery);
Illustrious answered 19/9, 2012 at 15:43 Comment(1)
Didn't know that. Rolled Jquery back to 1.7.2 and it works flawlessly with UI 1.8.12. Thank you for insight.Aftonag
B
5

Laymans terms just edit your jquery-ui-(version).js file. Add the following to the top after the jquery function call:

(function($) {
     if (!$.curCSS) $.curCSS = $.css; 

This will correct the error.

Brainstorm answered 16/10, 2013 at 14:32 Comment(0)
M
1

Just Update the jquery.ui.min.js to the appropriate version. I had issues with version 1.8.11 and when I updated to 1.8.22, it was working fine. That's the way I would prefer to go rather than editing the built-in jquery files even if it is buggy..

Malayopolynesian answered 24/10, 2013 at 9:51 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.