Skip Navigation

[Resolved] Uncaught TypeError: $ is not a function when upgrade new layouts, view version

This support ticket is created 5 years, 4 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 5 replies, has 3 voices.

Last updated by takoL 5 years, 4 months ago.

Assisted by: Shane.

Author
Posts
#1303019

Hello, I have upgraded some plugin:
Toolset Views 2.8.4 to 2.9
Toolset Types 3.3.1 to 3.3.3
Toolset Layouts 2.5.2 to 2.6.1
and some my javascripts code error:

Uncaught TypeError: $ is not a function

#1303025

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Private fields.

Thanks,
Shane

#1303107

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eloi,

I was able to successfully download the duplicator package.

Could you let me know exactly where to go to see the issue ?

Thanks,
Shane

#1303135

My javascript in Layouts CSS and JS Editor dont work when I upgrade plugin

you can check it in postype domain/ve-may-bay

#1303935

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Eloi,

Try changing all the $ to jQuery, this is so your code runs in compatibility mode.

So if you have $("#tonggia p").text(formatNumber(tonggia, '.', ','));
change it to

jQuery("#tonggia p").text(formatNumber(tonggia, '.', ','));

Thanks,
Shane

#1304089

Hi, I would like to add to this conversation the following...

Using the $-alias for the jQuery object worked just fine up until now, so we have a lot of jquery code in a lot of cred-forms, views, content templates etc.

Is there a way we can avoid having to change the $ into jQuery in all this code?

Thanks in advance!