Topic: There is an error in MDB jquery version 4.19.1

modadvisor free asked 4 years ago


Dear Sir,

I have install mdboostrap pro 4.19.1 using npm but it gives me error index.html:328 Uncaught TypeError: $(...).sideNav is not a function

just sir you can follow your given step given at here https://mdbootstrap.com/docs/jquery/getting-started/installation-guide/

you will get an error as straight forward. waiting for solutions

Thanks


modadvisor free commented 4 years ago

any update its 1 day i posted questions.


modadvisor free commented 4 years ago

please be specific that i am doing instillation in the laravel npm installation specific.


Tomek Makowski staff answered 4 years ago


Hi

Make sure that you have a pro version of MDB. Do you generate your activation token? Here is an instruction

https://mdbootstrap.com/docs/jquery/getting-started/installation-guide/#token-generation

Then you need to install your mdb pro like this:

npm install git+https://oauth2:YOUR_TOKEN_GOES_HERE@git.mdbootstrap.com/mdb/jquery/jq-pro.git --save

Where "YOUR_TOKEN_GOES_HERE" is your generated token from gitlab.

Regards


modadvisor free commented 4 years ago

@Tomek Makowski yes please i have already generated token. and try lot of times in laravel but not working. if you are on skype or teamviewer i can show you the issue now. let me know thanks


modadvisor free commented 4 years ago

installing through webpack npm. after app.js created it is not working.


Tomek Makowski staff commented 4 years ago

Okay, then be sure that you have a right order of scripts and check whether jQuery is added.


modadvisor free commented 4 years ago

@Tomek Makowski yes sir jquery i tested it is properly added and can be run. just mdb js is not properly run. this is issue is coming once app.js created. i have verified it many times. we 2 people are trying from yesterday but no outcome. i can show you through screen sharing. thanks


Tomek Makowski staff commented 4 years ago

Try this solution: https://mdbootstrap.com/support/jquery/how-to-build-mdb-v4-16-0-with-laravel-mix/


modadvisor free commented 4 years ago

ok i am trying now that solution. till that please see this image. you can see sideNav function not found in console. https://ibb.co/YcrGbd3


modadvisor free commented 4 years ago

@Tomek Makowski i tried your solution but it gives me error now Uncaught ReferenceError: $ is not defined. error changed


Tomek Makowski staff commented 4 years ago

So, it seems like lack of jQuery, try to add jQuery via CDN (it has to be on the first place among js scripts)

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>


modadvisor free commented 4 years ago

if i add cdn link of your jquery then it gives again same error back sideNave is not a function :)


Tomek Makowski staff commented 4 years ago

hmm, try to add your js code to document.ready

$( document ).ready(function() { // sideNav init });

If this won't work, show me your code in the snippet code editor

snippet code editor: https://mdbootstrap.com/snippets/


modadvisor free commented 4 years ago

please check this https://mdbootstrap.com/snippets/jquery/modadvisor/2444038#js-tab-view


Tomek Makowski staff commented 4 years ago

Hmm but this is a problem only with side nav or other components don't work as well? (remember every component has to be initialized in document.ready). Moreover, check the source of mdb.js/mdb.min.js


Tomek Makowski staff commented 4 years ago

this snippet is privet. You have to set this snippet as public (i cannot open it)


modadvisor free commented 4 years ago

yes i am adding js code in document.ready but the issues seems to be something else. if you can come on anydesk i can show you my screen. i am just installing fresh install only. let me know because if you see direct on my screen that can be solve it faster.


Tomek Makowski staff commented 4 years ago

No, I cannot do this in this way. Send me your project via mail or Github link. I will try to reopen your problem.

mail: t.makowski@mdbootstrap.com


modadvisor free commented 4 years ago

@Tomek Makowski please confirm i sent you complete source code from email : am_it@live.com


Tomek Makowski staff commented 4 years ago

Yes, I got your mail. I will try to fix it soon


modadvisor free commented 4 years ago

@Tomek Makowski sure please i will wait your reply asap. Thanks


modadvisor free commented 4 years ago

@Tomek Makowski any update sir?


modadvisor free commented 4 years ago

@Tomek Makowski dear sir let me know how it is progressing. can i expect resolution today ? Thanks


Tomek Makowski staff commented 4 years ago

@modadvisor I replied to you with more specific info via e-mail


modadvisor free commented 4 years ago

@Tomek Makowski still there is an issue. i just replied you on the mail. can you check for me ? thanks



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: 4.19.1
  • Device: PC
  • Browser: google chrome
  • OS: windows 10
  • Provided sample code: No
  • Provided link: Yes