New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to put mdb.js to header #49
Comments
Do you load MDB.js after jQuery and Bootstrap? |
Yes. Problem is definitely mdb.js. |
do you get any console logs? |
TypeError: body is null |
@gadelat I tried convincing them at #31 , not luck. I use this to fix it:
|
I have the Pro version and I'm using it with a Rails app, which uses TurboLinks, which requires all JS files to be included in the head. @ipepe's work around didn't work for me but I managed to split out MDB from the standard manifest and load it in the body. The problem I'll run into is that TurboLinks is going to replace the body of the page, and MDB should already be loaded rather than it loading again and again. It will be cached of course, but that's still a lot of overhead. Is it not possible for MDB to be updated to solve this problem? Is there a feature or file I can drop that will resolve this? It looks to just be the Waves feature? |
Please wrap Waves.initialization into |
I marked this as a bug and added to our TODO list |
I think it should be wrapped into:
|
Was this ever actioned? I am having the same issue with turbo links and waves |
having the same issue here |
I have the same issue. This is what I should do: |
We decided that it can be done. Waves.js will be launched after the document is ready. It should be in the next released package. |
We have lot of inline javascripts generated via backend. If these scripts use mdb functions, they will crash, because mdb.js requires to include it at the end of HTML body.
Only way I see to make this currently work is to wrap all of the inline scripts to some function, which sucks.
The text was updated successfully, but these errors were encountered: