Topic: Problem with float button
giorgio.ponza pro premium priority asked 7 years ago
- edit (pointing to href /artists/edit)
- delete (pointing to href /artists/delete)
Ollie Vincent pro answered 7 years ago
Hi all,
I found a work around when I commented on https://mdbootstrap.com/support/fixed-button-with-waves-does-not-work/ with a solution.
Use the code below to get external links working.
$(document).ready(function () { $('.fixed-action-btn').unbind('click'); });
I have no idea if it works on multiple fixed buttons - so you might need to customise.
Marta Szymanska staff pro premium answered 7 years ago
Hi,
find this code in our mdb.js:
$('.fixed-action-btn').on({
click: function click(e) {
e.preventDefault();
toggleFABMenu($('.fixed-action-btn'));
return false;
}
});
comment these lines, save the file and minify.
This piece of code cause you can't go to another website.
Best,
Marta
Marta Szymanska staff pro premium answered 7 years ago
Gautam Chaudhary pro premium priority commented 7 years ago
Any update about the same. Same issue here. Actually clicking on the link of the fixed floating button triggers (close list) rather than opening the link defined to the <li>. Another issue: On mobile, it takes at least two touches (on the main floating btn) to open the btn in<li> <pre> <div class="fixed-action-btn" style="bottom: 10px; right: 10px;"> <a class="btn-floating rgba-red-strong"> <i class="fa fa-arrows-alt"></i> </a> <ul> <li><a href="https://google.com" target="_blank" class="btn-floating btn-sm bg-primary"><i class="fa fa-map-marker"></i></a></li> <li><a href="https://google.com" target="_blank" class="btn-floating btn-sm orange"><i class="fa fa-puzzle-piece"></i></a></li> </ul> </div> </pre>Marta Szymanska staff pro premium answered 7 years ago
tmurzens pro answered 7 years ago
Marta Szymanska staff pro premium answered 7 years ago
tmurzens pro answered 7 years ago
yddap17 pro answered 6 years ago
Marta Szymanska staff pro premium answered 6 years ago
jmesserer pro answered 6 years ago
Is there an update on this fix?
I tried to apply the manual fix mentioned above in 4.7.0 but I'm not finding a line matching "$('.fixed-action-btn').on({" ... can you please advise what line numbers I should comment out in mdb.js for 4.7.0?
giorgio.ponza pro premium priority commented 6 years ago
Hi jmesserer, they still have this bug open. While waiting for a fix, i usually comment the following piece of javascript in mdb.js (for versione 4.5.12+)
$('.fixed-action-btn:not(.smooth-scroll) > .btn-floating').on('click', function (e) { if (!$(_this).hasClass('smooth-scroll')) { e.preventDefault(); toggleFABMenu($('.fixed-action-btn')); return false; } });
Marta Szymanska staff pro premium answered 6 years ago
Hi,
Have you seen this post on our support forum: https://mdbootstrap.com/support/jquery/fixed-button-doesnt-work/? There is a snippet with working foxed action button.
Best, Marta
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- User: Pro
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No