Topic: MDBootstrap : integration with Browserify
GIRAUD
pro
asked 5 years ago
Hello,
I’m a new (and happy) MDBootstrap user :-). However I currently have a problem concerning MDB integration with Browserify, and I didn’t find any answers in the forums.
I’d like to use Browserify to include mdb in my app (JQuery/Bootstrap/MDB). Here is my code :
$ = jQuery = require('jquery');
Tether = require('tether');
bootstrap = require('bootstrap');
require('mdbootstrap');
I get the following error message :
Uncaught ReferenceError: Waves is not defined
Problem seems to occur during Waves 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 */
What is the best way to handle this ?
Best regards,
Jérôme
Add comment
Mirosław Stasiak
free
answered 5 years ago
Hi Jérôme,
This is a problem when using Browserify
Comment the following code lines in mdb.js. It should be good now.
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 */
Regards
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Status
Specification of the issue
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No
Tags