NetTalk Central

Author Topic: jquery version conflicts  (Read 3516 times)

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
jquery version conflicts
« on: April 21, 2021, 10:51:24 PM »
hi,
i have included some html codes that requires jquery-2.2.4.min.js
however, this breaks the nt form that is in the same page. NT is using version 3.3.1

it gives the error: Uncaught TypeError: $(...).ntbrowse is not a function

i have tried the following noconflict method with no success.

<script src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
 <script type="text/javascript">
             $(...).ntbrowse = $.noConflict(true);
        </script>


any suggestions?

regards,
jason
nt11.51
c11

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: jquery version conflicts
« Reply #1 on: April 22, 2021, 08:45:42 PM »
>> I have included some html codes that requires jquery-2.2.4.min.js

does your javascript code work with jquery 3.3.1 ?
(Incidentally the current nettalk version uses jquery 3.4.1

cheers
Bruce

ntnewbies

  • Full Member
  • ***
  • Posts: 184
    • View Profile
    • Email
Re: jquery version conflicts
« Reply #2 on: April 22, 2021, 10:55:05 PM »
hi bruce,
no it is not working.



if you notice at the bottom of the page is nettalk contact form with lookup button affected due to two different version of jquery.

if i remove the jquery-2.2.4.min.js reference, then nt works but the styles of the html suffers.

regards,
jason

« Last Edit: July 30, 2021, 12:04:15 AM by ntnewbies »

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: jquery version conflicts
« Reply #3 on: April 23, 2021, 04:38:08 AM »
>> if i remove the jquery-2.2.4.min.js reference,

well yes, you can't have 2 different copies of jQuery on the page. So you should remove the older version.

>> but the styles of the html suffers.

well that should be easy for you to fix in your custom CSS file.

Cheers
Bruce