0
I would like to use the bootstrap modal to open a list of subtitles. But I would like to display the meaning only when clicked on the legend. Got a way? Don’t need to have styles just do a slidown.
I used a javascript to carry a div:
'<script type="text/javascript" language="javascript">
function abreFecha(sel) {
$(sel).slideToggle();
}
</script>'
<a class="btn btn-primary" data-toggle="modal" data-target="#modal-
mensagem">
<span class="glyphicon glyphicon-th-list"></span> Ver Legendas
</a>
<div class="modal fade" id="modal-mensagem">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">
<span>×</span></button>
</div>
<div class="modal-body">
<?php
include 'includes/legenda.php';
?>
<br>
<div id="sigla"> O significado vai aqui</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>
</div>
</div>
caption.php:
<div class="container-fluid">
<div class="row">
<a href="javascript:abreFecha('#sigla')" class="col-md-1">SS</a>
<a href="javascript:abreFecha('#sigla')" class="col-md-1">ABC</a>
<a href="javascript:abreFecha('#sigla')" class="col-md-1">ECO</a>
</div>
</div>
So now you’re opening a modal with a few acronyms, and clicking opens the div with the meaning. The question now is: How to display a different text in the same div ? Knowing that each acronym has a caption? I would like to have the meaning on the caption page, so it is cleaner the main page.
What was your attempt?
– adventistaam
how is the legend?
– user60252
AP < this is the abbreviation. Apartment = is the abbreviation of apartment/ < this is the caption that appears when you click.
– Jaimir Tapia
Try to make a kind of a dropdown menu inside, but it got very buggy. I know the bootstrap has some menus, can you get some of the style ? I will work more enoite, if anyone has any idea or path to point, already help enough.
– Jaimir Tapia
Good night. I think what you want a Popover, here shows how to do: https://getbootstrap.com/docs/4.0/components/popovers/ Another option would be to use a Tooltip: https://getbootstrap.com/docs/4.0/components/tooltips/ I hope I helped.
– Rodrigo Sandrini
You mean a list of subtitles and open a modal by clicking an item from that list
– user60252
Inside the modal, a list of Acronyms SS AB CC . Same thing as calling a content in a DIV with javascript and css, but there’s something in the bootstrap pattern, so it doesn’t look so different ?
– Jaimir Tapia