Topic: bug button floating
Alex Gotardi pro asked 8 years ago
Alex Gotardi pro answered 8 years ago
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- Font Awesome -->
<link rel="stylesheet" href="/assets/font-awesome/4.6.3/css/font-awesome.min.css">
<!-- Bootstrap core CSS -->
<link href="/css/bootstrap.min.css" rel="stylesheet">
<!-- Material Design Bootstrap -->
<link href="/css/mdb.min.css" rel="stylesheet">
</head>
<body>
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
<a class="btn-floating btn-large btn-default waves-effect waves-light">
<i class="fa fa-bolt"></i>
</a>
<ul>
<li>
<a type="button" role="button" href="#dontwork" class="btn-floating btn-primary"><i class="fa fa-plus"></i></a>
</li>
</ul>
</div>
<!-- SCRIPTS -->
<!-- JQuery -->
<script type="text/javascript" src="/js/jquery-2.2.3.min.js"></script>
<!-- Bootstrap tooltips -->
<script type="text/javascript" src="/js/tether.min.js"></script>
<!-- Bootstrap core JavaScript -->
<script type="text/javascript" src="/js/bootstrap.min.js"></script>
<!-- MDB core JavaScript -->
<script type="text/javascript" src="/js/mdb.js"></script>
<!-- Animations init-->
<script>
new WOW().init();
</script>
</body>
</html>
Alex Gotardi pro answered 8 years ago
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
<a class="btn-floating btn-large btn-default waves-effect waves-light">
<i class="fa fa-ellipsis-v"></i>
</a>
<ul>
<li>
<a type="button" role="button" href="#!!!!" class="btn-floating btn-primary"><i class="fa fa-plus"></i></a>
</li>
</ul>
</div>
Michal Szymanski staff pro premium priority answered 8 years ago
Alex Gotardi pro answered 8 years ago
Michal Szymanski staff pro premium priority answered 8 years ago
Alex Gotardi pro answered 8 years ago
Michal Szymanski staff pro premium priority answered 8 years ago
Michal Szymanski staff pro premium priority answered 8 years ago
Michal Szymanski staff pro premium priority answered 8 years ago
<div class="fixed-action-btn" style="bottom: 45px; right: 24px;">
<a class="btn-floating btn-large btn-default waves-effect waves-light">
<i class="fa fa-bolt"></i>
</a>
<ul>
<li>
<a id="test" type="button" role="button" href="http://mdbootstrap.com/" class="btn-floating btn-primary"><i class="fa fa-plus"></i></a>
</li>
</ul>
</div>
$('#test') .click(function() {
alert( "Handler for .click() called." );
});
However MDB prevents you from using the link inside child buttons of FAB, because it should be using for event bindings, not links.
If you want to change it, open mdb.js and remove (or comment) code from 6175 to 6181 line
$('.fixed-action-btn').on({
click: function (e) {
e.preventDefault();
toggleFABMenu($('.fixed-action-btn'));
return false;
}
});
Juan Ramos Suyón answered 8 years ago
href="#"
.
Thank you for the clarification. Antonio J Vaillo answered 7 years ago
$(document).ready(function(){ $('.fixed-action-btn').unbind('click'); });
john.acb answered 5 years ago
Is the FAB button available for Angular version?
Bartłomiej Malanowski staff pro premium commented 5 years ago
Yes. You can find it here: https://mdbootstrap.com/docs/angular/components/buttons/#fixed-buttons
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: No
- Technology: General Bootstrap questions
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No