Topic: Problem with float button
giorgio.ponza priority asked 7 years ago
- edit (pointing to href /artists/edit)
- delete (pointing to href /artists/delete)
Marta Wierzbicka staff answered 5 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
jmesserer pro answered 5 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 priority commented 5 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 Wierzbicka staff answered 6 years ago
yddap17 pro answered 6 years ago
Marta Wierzbicka staff answered 6 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
tmurzens pro answered 6 years ago
Ollie Vincent pro answered 6 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 Wierzbicka staff answered 6 years ago
tmurzens pro answered 6 years ago
Marta Wierzbicka staff answered 7 years ago
Marta Wierzbicka staff answered 7 years ago
Gautam Chaudhary 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>FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Answered
- ForumUser: Priority
- Premium support: Yes
- Technology: MDB jQuery
- MDB Version: -
- Device: -
- Browser: -
- OS: -
- Provided sample code: No
- Provided link: No