GithubHelp home page GithubHelp logo

Comments (13)

ipepe avatar ipepe commented on April 28, 2024 3

@gadelat I tried convincing them at #31 , not luck. I use this to fix it:

(function ($) {
    $(document).ready(function () {
        //Initialization
        Waves.attach('.btn, .btn-floating', ['waves-light']);
        Waves.attach('.waves-light', ['waves-light']);
        Waves.attach('.navbar-nav a:not(.navbar-brand), .nav-icons li a, .navbar form, .nav-tabs .nav-item', ['waves-light']);
        Waves.attach('.pager li a', ['waves-light']);
        Waves.attach('.pagination .page-item .page-link', ['waves-effect']);
        Waves.init();/* FORMS */
    });
});

from material-design-for-bootstrap.

mattonit avatar mattonit commented on April 28, 2024 2

I marked this as a bug and added to our TODO list

from material-design-for-bootstrap.

mattonit avatar mattonit commented on April 28, 2024

Do you load MDB.js after jQuery and Bootstrap?

from material-design-for-bootstrap.

ostrolucky avatar ostrolucky commented on April 28, 2024

Yes. Problem is definitely mdb.js.

from material-design-for-bootstrap.

mattonit avatar mattonit commented on April 28, 2024

do you get any console logs?

from material-design-for-bootstrap.

ostrolucky avatar ostrolucky commented on April 28, 2024

TypeError: body is null

from material-design-for-bootstrap.

blimey85 avatar blimey85 commented on April 28, 2024

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?

from material-design-for-bootstrap.

agavazov avatar agavazov commented on April 28, 2024

Please wrap Waves.initialization into $(document).ready(function () { ... initialization here .... }); as @ipepe told you.

from material-design-for-bootstrap.

vipantonio avatar vipantonio commented on April 28, 2024

Please wrap Waves.initialization into $(document).ready(function () { ... initialization here .... }); as @ipepe told you.

I think it should be wrapped into:

$( document ).on('turbolinks:load', function() { ... initialization here .... });

from material-design-for-bootstrap.

muzbox avatar muzbox commented on April 28, 2024

I marked this as a bug and added to our TODO list

Was this ever actioned? I am having the same issue with turbo links and waves

from material-design-for-bootstrap.

carltonsmith avatar carltonsmith commented on April 28, 2024

having the same issue here

from material-design-for-bootstrap.

locddspkt avatar locddspkt commented on April 28, 2024

I have the same issue. This is what I should do:
Include all the css, js script but mdb.js. And then, put it at the bottom before the end body tag

from material-design-for-bootstrap.

PiotrObrebski avatar PiotrObrebski commented on April 28, 2024

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.

from material-design-for-bootstrap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.