NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: ntnewbies on April 21, 2021, 10:51:24 PM

Title: jquery version conflicts
Post by: ntnewbies 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
Title: Re: jquery version conflicts
Post by: Bruce 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
Title: Re: jquery version conflicts
Post by: ntnewbies 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

Title: Re: jquery version conflicts
Post by: Bruce 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