Bootstrap 5 is not working on laravel project - bootstrap-5

I have a laravel project and I'm using Bootstrap 5 and the problem is tooltip is not working
I've tried many many ways that people suggested in Stackoverflow but none of them worked for me
Html:
<li class="mitem"> <i class="fas fa-home" aria-hidden="true"></i> </li>
JS:
require('./bootstrap')
require('../../node_modules/bootstrap/dist/js/bootstrap.bundle.min')
$(document).ready(function() {
$('[data-bs-toggle=tooltip]').tooltip();
});
Bootstrap version:
"bootstrap": "^5.1.3",
I even tried without -bs- but it didn't work neither
Bootstrap is loaded and everything is working except tooltip

Related

Why is the Bulma tooltip not working on this span?

I am using Bulma and cannot get the tooltip to work on a span, can anyone see what the issue is please?
<span class="favicons fa-layers fa-fw tooltip is-tooltip-bottom" data-tooltip="test">
<i class="fas fa-pound-sign"></i>
<span class="fas fa-caret-down" data-fa-transform="shrink-7 right-10"></span>
</span>
I am expecting to see a tooltip but am not
It seems you use bulma-tooltip extension.
Is extension correctly installed?
Take a look on the docs to see how to install and use it in your site:
https://wikiki.github.io/#installation
If you use webpack, you can add this extension with npm:
npm install bulma-tooltip

components-font-awesome is not been displayed

I have installed components-font-awesome with bower for my rails application.
I successfully include the sass files,
#import "components-font-awesome/scss/fa-brands";
#import "components-font-awesome/scss/fontawesome";
Then when I am trying to add an icon to my page
<i class="fab fa-facebook-f" style="font-size: 48px;"></i>
it's not been displayed.
I am tracing the element on console and looks good.
It has a font-family:
Font Awesome 5 Brands';
and the right before content
content: "\f39e";
But still it's not displayed.
Include the class fa. It looks like you have used fab.
<i class="fa fa-facebook-f" style="font-size: 48px;"></i>

ScrollSpy working on localhost, not on server

I'm developing an ASP MVC application with ScrollSpy on one of my pages. I'm having a strange problem where it's working correctly when I run my site from localhost, but when I publish the application to a server, ScrollSpy isn't adding the active class to the <li> items.
This is the script on my page which initializes ScrollSpy.
#section scripts
{
<script>
$(document).ready(function () {
$('body').attr("data-target", "#side-nav");
$('body').attr("data-spy", "scroll");
});
</script>
}
Here's how my ScrollSpy navigation is defined.
<div id="side-nav" class="pull-left">
<ul class="affix nav nav-list nav-pills nav-stacked">
<li>First Section</li>
<li>Second Section</li>
<li>Third Section</li>
</ul>
</div>
Each section has an anchor tag defined like this
<a class="anchor" id="first-section"></a>
I verified that jquery.js and bootstrap.js are referenced correctly on the server by going to View Page Source and clicking on the link to view the .js file. I tried replacing the .min versions of the files with the same .js file that's being used on localhost, but that doesn't work.
I apologize in advance for this being a difficult to recreate problem. Please tell me if I should post any additional data to make it easier to troubleshoot.

jquery mobile external panel not taking on styling

I am trying to implement the new external panel offered in jQuery mobile 1.4 rc1. I am able to get the panel to enter and dismiss across all pages as it should, however the panel does not inherit the styles from the default theme (c) nor will it if a theme is defined using data-theme=a. The panel will load an unstyled list view unless I navigate the to #app-menu in the url then the styles appear. Does anyone know why this might be?
<script id="panel-init">
$(function () {
$("body > [data-role='panel']").panel();
});
</script>
<div data-role="panel" id="app-menu" data-display="push" data-position="left">
<ul data-role="listview">
<li data-role="list-divider">Menu</li>
<li data-icon="home" data-bind="click: navTo.bind($data, 'location-map', 'flip', false)">current party</li>
</ul>
</div>
Note: data-theme attribute should be added to External panel as it doesn't inherit style/theme from parent container. Internal panel inherit styles/theme from page div containing it.
jQuery Mobile now offer external panel and toolbar. Those widgets aren't being initiated automatically by jQM. They need to be initiated manually and followed by .enhanceWithin() to enhace contents within.
$(function () {
$("[data-role=panel]").panel().enhanceWithin();
});
Demo
I'm not allowed to comment but in the demo #Omar provide the many data-icon="home" icons are not showing up and if I add class="ui-btn ui-icon-arrow-l" to the Anchor, it doesn't show up either so there appears to be something more that needs to be done.
With a little investigation, I found that adding adding ui-btn-icon-left like so will fix anchors
Anchor
adding these classes to the <li data-icon="home" doesn't quite work but changing <li data-icon="home">item</li> to <li class="ui-btn ui-icon-home ui-btn-icon-left ui-corner-all">item</li> will get the icon to show up but will not move the text over so it still looks bad.

jquery mobile 1.1.1 ui-mini

I have just upgraded jquery mobile from 1.1.0 to 1.1.1 and my navbar is messed up now. Googling I've discovered that, in 1.1.1, the .ui-mini class is added by default.
Unfortunately the documentation isn't up to date so I don't know how to get back the "classic" style for my tabs.
I've tried data-mini="false", data-full="true" but it doesn't works.
Any idea?
Navbar with 1.1.1 Styles:
Seems to be working fine except for the extra margins around the buttons - http://jsfiddle.net/nirmaljpatel/Mc3be/
The .ui-mini class only adds some margin... you can get rid of that:
HTML:
<div id="myNavBar" data-role="navbar">
<ul>
<li>One</li>
<li>Two</li>
</ul>
</div><!-- /navbar -->
CSS:
#myNavBar.ui-mini {
margin: 0 0;
}
Navbar with .ui-mini margin removed:

Resources