0
votes

My HTML is using a lot of js files (6 js files) including jquery js . When i change the culture, some file does not load.

My html looks this way

 <script src="~/Scripts/library/jquery.js"></script>
 <script src="~/Scripts/Home/lory.min.js"></script>
 <script src="~/Scripts/Home/modalEffects.js"></script>
 <script src="~/Scripts/Home/classie.js"></script>
 <script src="~/Scripts/library/jqueryval.js"></script>
 <script src="~/Scripts/library/localstorage.js"></script>

I got the below error.

TypeError: $(...).magnificPopup is not a function $('.open-popup-link').magnificPopup({ registration.js (line 5) ReferenceError: lory is not defined // lory(multiSlides, { localhost:50978 (line 12, col 12

I am working on a web based application build in asp.net mvc4. and jquery as client side. Its multi lingual site. English, french, Spanish and Portuguese.

All languages are working fine except Portuguese. When I select Portuguese some javascript file are not loading. and its working fine in other languages.

same code works for all other languages

thanks in advance.

1
any errors in the console?Imesh Chandrasiri
yes, i got error like this TypeError: $(...).magnificPopup is not a function $('.open-popup-link').magnificPopup({ registration.js (line 5) ReferenceError: lory is not defined // lory(multiSlides, { localhost:50978 (line 12, col 12Chetann
TypeError: $(...).magnificPopup is not a functionChetann
ReferenceError: lory is not definedChetann
You've stated that only a certain language is has this problem. is there are seperate template files for each language? if so, please check on the order of the libraries defined there! The order of them are important! first jQuery then the other libraries!Imesh Chandrasiri

1 Answers

0
votes

TypeError: $(...).magnificPopup is not a function Means that some addon is blocking your script from working properly or if you are using adblock, it's probably blocking this script and interfering.

Had the same problem, My adblock seemed to cause it.