0
I have this Popover
and would like when loading the page to be opened, and only close after the user click on Entendi
the code I’m using is this Script
:
$(document).ready(function () {
// Associa o evento do popover ao clicar no link.
$('#Responsivo').popover({
//trigger: 'manual',
placement: 'bottom',
html: true,
title: 'O que é um site ou software responsivo?',
content: $('#div-popover').html() // Adiciona o conteúdo da div oculta para dentro do popover.
}).click(function (e) {
e.preventDefault();
// Exibe o popover.
$(this).popover('show');
});
});
the text of Tag
:
<h4><b>Criação de Sites e Softwares <span id="Responsivo" >responsivos</span>:</b></h4>
and this Modal
to the Popover
:
<div id="div-popover" class="hide">
Dizer que um site ou um software é repsonsivo, indica que ele pode ser utilizado em computadores, tablets, tvs e celulares smartphones. o conteúdo do seu site, se ajusta de acordo com a tela do disposivo.
<br /><br />
<button id="close" class="btn btn-primary">Entendi</button>
</div>
Obs: to close I tried to do the script
that made hide
in div
, but it didn’t, I believe that why the div
is only being displayed on Popover
, then I would have to close the Popover
and not the div
.
$('#close').click(function () {
$('#div-popover').hide();
});
Can provide a Fiddle so we can simulate?
– BrTkCa
$('#Responsivo').popover({ .. }).popover("show");
doesn’t work?– relaxeaza
@Rafaelmafra worked to load yes :) thanks for the tip, know how to close by the button?
– Fabio Souza
At your event
.click
substitute$('#div-popover').hide();
for$('#Responsivo').popover('hide')
..– relaxeaza
Didn’t roll to close
– Fabio Souza
I put an answer, see if it works.
– relaxeaza