I've included the following in my html file:
<h:outputStylesheet name="css/bootstrap.css" />
<h:outputScript name="js/jquery-2.0.2.min.js" />
<h:outputScript name="js/bootstrap-tooltip.js" />
<h:outputScript name="js/bootstrap-popover.js" />
The part that is supposed to make the popover:
<ui:repeat var="lowFareCalenderSearchItem" value="#{lowFareCalenderSearchItems}">
<td>
<a href="#" id="searchItem" class="btn" rel="popover">#searchResult.getTotal()}</a>
<script>
$("#searchItem").popover({
title: "title",
content: "content"
});
</script>
</td>
</ui:repeat>
The popovers I'm trying to get to display don't turn up when I hover over or click the button.
I have looked at other similar questions, and nothing I've found there has worked for me.
Does anyone know why this could be happening?
Popovers can be triggered via JavaScript — just call the popover() Bootstrap method with the id , class or any CSS selector of the required element in your JavaScript code. You can either initialize popovers individually or all in one go.
The Popover plugin is similar to tooltips; it is a pop-up box that appears when the user clicks on an element. The difference is that the popover can contain much more content. Tip: Plugins can be included individually (using Bootstrap's individual "popover. js" file), or all at once (using "bootstrap.
Many of our components require the use of JavaScript to function. Specifically, they require our own JavaScript plugins and Popper.
An extended table to the integration with some of the most widely used CSS frameworks. ( Supports Bootstrap, Semantic UI, Bulma, Material Design, Foundation)
It turns out that the popover can't just be put into the table cell.
I solved it by using a div and span inside the cell:
<td>
<div>
<span id="searchItem" rel="popover">
Click to pop
</span>
<script>
$(document).ready(function() {
$("#searchItem").popover({
html: true,
animation: false,
content: "TO BE ANNOUNCED",
placement: "bottom"
});
});
</script>
</div>
</td>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With