Page 1 of 1

TypeError: $ .subscribe is not a function

Posted: Sat 25 Apr 2020 7:43 pm
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

Re: TypeError: $ .subscribe is not a function

Posted: Sat 25 Apr 2020 7:50 pm
by water01
Could we have a link to your web site please as that may help us diagnose the problem.

Re: TypeError: $ .subscribe is not a function

Posted: Sat 25 Apr 2020 8:16 pm
by sfws
(text removed as not relevant)

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 3:52 am
by HansR
Just a guess: do you include jQuery.js twice or more?

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 10:16 am
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?

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 11:19 am
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.

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 1:17 pm
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.

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 4:46 pm
by tedybear57
Ok i will test and i will come back to you to tell you anyway already thank you

Re: TypeError: $ .subscribe is not a function

Posted: Sun 26 Apr 2020 8:34 pm
by tedybear57
It was good thanks for the help