In the script, you can switch to other events like Hover, etc...
Css:
.popover {
position: absolute;
top: 0;
left: 0;
z-index: 1060;
display: none;
max-width: 276px;
padding: 1px;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
font-style: normal;
font-weight: normal;
line-height: 1.42857143;
text-align: left;
text-align: start;
text-decoration: none;
text-shadow: none;
text-transform: none;
letter-spacing: normal;
word-break: normal;
word-spacing: normal;
word-wrap: normal;
white-space: normal;
background-color: #fff;
-webkit-background-clip: padding-box;
background-clip: padding-box;
border: 1px solid #ccc;
border: 1px solid rgba(0, 0, 0, .2);
border-radius: 6px;
-webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
box-shadow: 0 5px 10px rgba(0, 0, 0, .2);
line-break: auto;
}
.popover.bottom {
margin-top: 10px;
}
.popover-title {
padding: 8px 14px;
margin: 0;
font-size: 14px;
background-color: #f7f7f7;
border-bottom: 1px solid #ebebeb;
border-radius: 5px 5px 0 0;
}
.popover-content {
padding: 9px 14px;
}
.popover > .arrow,
.popover > .arrow:after {
position: absolute;
display: block;
width: 0;
height: 0;
border-color: transparent;
border-style: solid;
}
.popover > .arrow {
border-width: 11px;
}
.popover > .arrow:after {
content: "";
border-width: 10px;
}
.popover.top > .arrow {
bottom: -11px;
left: 50%;
margin-left: -11px;
border-top-color: #999;
border-top-color: rgba(0, 0, 0, .25);
border-bottom-width: 0;
}
.popover.top > .arrow:after {
bottom: 1px;
margin-left: -10px;
content: " ";
border-top-color: #fff;
border-bottom-width: 0;
}
.popover.bottom > .arrow {
top: -11px;
left: 50%;
margin-left: -11px;
border-top-width: 0;
border-bottom-color: #999;
border-bottom-color: rgba(0, 0, 0, .25);
}
.popover.bottom > .arrow:after {
top: 1px;
margin-left: -10px;
content: " ";
border-top-width: 0;
border-bottom-color: #fff;
}
HTML
<div class="bgform-2 popover fade bottom in">
<div class="arrow"></div>
<h3 class="popover-title">Titulo 1</h3>
<div class="popover-content">
<form>
<fieldset>
<legend>Form</legend>
<label>Nome: </label>
<input type="text" placeholder="digite seu nome completo"/>
<input type="submit" value="Enviar" />
</fieldset>
</form>
</div>
</div>
<button type="submit" id="btn">
Enviar
</button>
Jquery
$("#btn").click(function(){
$('.popover').toggle(250);
})
Following demonstration...
https://jsfiddle.net/8k4akkL3/2/
@Leocaracciolo and a normal input. I just need to do that when clicking on the input open that toltip with a
input
in. and not a modal– usuario
@Leocaracciolo Yes. but unfortunately I cannot use modal
– usuario
See if you want something like this: http://jsfiddle.net/BumU5/1138/
– Sam
have an example up to W3... https://www.w3schools.com/howto/howto_css_tooltip.asp
– Bruno Costa
if you have already styled, so that it appears in the correct location and such, follow this link, https://answall.com/questions/191776/detectar-evento-click-fora-do-element :) so that it closes when you click on it, or off it
– Murilo Melo