Topic: MDB 4 Initial Setup, js firing errors.
Pratik Kelwalkar
free
asked 6 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>MDB4 Demo</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="MDB-4/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="MDB-4/css/mdb.min.css">
<link rel="stylesheet" type="text/css" href="MDB-4/css/style.css">
<script src="MDB-4/js/jquery-2.2.3.min.js"></script>
<script src="MDB-4/js/tether.min.js"></script>
<script src="MDB-4/js/bootstrap.min.js"></script>
<script src="MDB-4/js/mdb.min.js"></script>
</head>
<body>
<div class="container">
<div class="md-form">
<i class="fa fa-envelope prefix"></i>
<input type="email" id="form9" class="form-control validate">
<label for="form9" data-error="wrong" data-success="right" class="">Type your email</label>
</div>
<button type="button" class="btn btn-success">Primary</button>
<button type="button" class="btn btn-primary waves-effect waves-light">Primary</button>
</div>
</body>
</html>
Problems : Input labels do not float. Button Ripple effect missing.
Console Error - Cannot read property 'addEventListener' of nullWaves.init @ mdb.js:5093(anonymous function) @ mdb.js:5220
What is the problem, am i missing something?
jpa57
free
answered 5 years ago
//= require js/jquery-2.2.3
//= require js/tether
//= require js/bootstrap
//= require js/mdb
application.css.erb (I get font-awesome from a gem):
*= require font-awesome
*= require css/bootstrap
*= require css/mdb
So now the
<%= javascript_include_tag "application" %>
goes inside <body> where traditionally I've put those in inside <head>. I left the
<%= stylesheet_link_tag "application", media: "all" %>
in <head>.
None of the solutions I found to bundle MDBootstrap worked, including rails-assets.org which has an etry at https://rails-assets.org/#/components/MDBootstrap. I had to actually copy js, css and img into /vendor/assets/mdb/*
Pratik Kelwalkar
free
answered 6 years ago
Michal Szymanski
staff
answered 6 years ago
robert713 free commented 5 years ago
hello I have a problem with SideNav, I would like to help me pleaseFREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
- User: Free
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No