Welcome to the Cumulus Support forum.

Latest Cumulus MX V4 release 4.4.2 (build 4085) - 12 March 2025

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Legacy Cumulus 1 release 1.9.4 (build 1099) - 28 November 2014
(a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

If you are posting a new Topic about an error or if you need help PLEASE read this first viewtopic.php?p=164080#p164080

TypeError: $ .subscribe is not a function

Discussion of Mark Crossley's HTML5/Javascript gauges

Moderator: mcrossley

Post Reply
tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

TypeError: $ .subscribe is not a function

Post by tedybear57 »

Hello, I have a little problem with the gauges I am installing them on my site to put the weather station data there but it does not work I have an error that goes back and I look for my I have not found can you help me ? I put the fault on you

Uncaught TypeError: $ .subscribe is not a function
     at init (gauges.js: 684)
     at Object.getInstance (gauges.js: 698)
     at init (gauges.js: 461)
     at HTMLDocument. <anonymous> (gauges.js: 4210)
     at j (jquery-3.2.1.min.js: 2)
     at k (jquery-3.2.1.min.js: 2)

Thank you
water01
Posts: 3669
Joined: Sat 13 Aug 2011 9:33 am
Weather Station: Ecowitt HP2551
Operating System: Windows 10/11 64bit Synology NAS
Location: Burnham-on-Sea
Contact:

Re: TypeError: $ .subscribe is not a function

Post by water01 »

Could we have a link to your web site please as that may help us diagnose the problem.
David
Image
sfws
Posts: 1183
Joined: Fri 27 Jul 2012 11:29 am
Weather Station: Chas O, Maplin N96FY, N25FR
Operating System: rPi 3B+ with Buster (full)

Re: TypeError: $ .subscribe is not a function

Post by sfws »

(text removed as not relevant)
Last edited by sfws on Sun 26 Apr 2020 1:31 pm, edited 1 time in total.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: TypeError: $ .subscribe is not a function

Post by HansR »

Just a guess: do you include jQuery.js twice or more?
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

Thank you for your answers

Unfortunately the site and not online I am developing it locally on my computer using symfony 5.

I use Jquery 3.2.1 as in the demo site which and data in the zip.

And for the last question yes I use it on the basic page for Bootstrap that poses problem?
User avatar
mcrossley
Posts: 14384
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: TypeError: $ .subscribe is not a function

Post by mcrossley »

Yes, including jQuery a second time will recreate the $ object. The gauge code extends the jQuery $ object by adding the publish/subscribe functionality.
User avatar
HansR
Posts: 6926
Joined: Sat 20 Oct 2012 6:53 am
Weather Station: GW1100 (WS80/WH40)
Operating System: Raspberry OS/Bookworm
Location: Wagenborgen (NL)
Contact:

Re: TypeError: $ .subscribe is not a function

Post by HansR »

tedybear57 wrote: Sun 26 Apr 2020 10:16 am And for the last question yes I use it on the basic page for Bootstrap that poses problem?
What @mcrossley says. Yes including jQuery more than once poses problems as I experienced recently.
Hans

https://meteo-wagenborgen.nl
CMX build 4070+ ● RPi 4B ● Linux 6.6.62+rpt-rpi-v8 aarch64 (bookworm) ● dotnet 8.0.1
BlueSky: https://bsky.app/profile/wagenborgenwx.bsky.social
tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

Ok i will test and i will come back to you to tell you anyway already thank you
tedybear57
Posts: 4
Joined: Sat 25 Apr 2020 7:30 pm
Weather Station: arduino
Operating System: windows 10

Re: TypeError: $ .subscribe is not a function

Post by tedybear57 »

It was good thanks for the help
Post Reply