[RISOLTO]JQuery&Bootstrap 3.0 - Popover
Pagine → 1 2
08/10/2015 21:43:53
però in quella siscussione l'autore usa il metodo .popover('hide') che lo nasconde non lo distrugge
08/10/2015 21:51:30
si, con il metodo che usa lui però non so come associare il popover che mi interessa che io faccio con questa stringa
$('.prova').popover({
08/10/2015 22:33:31
Ho risolto. Non sò come, ma ho risolto. Utilizzando questa intestatura
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Example of Bootstrap Popover with Close Button</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap-theme.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
Al posto di
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title></title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="js/jquery.js"></script>
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>
e spostando il codice java nell'head usando questa dicitura
<script type="text/javascript">
$(document).ready(function(){
$('[data-toggle="cancelli"]').popover({
placement : 'top',
html : true,
title : 'User Info <a href="#" class="close" data-dismiss="alert">×</a>',
content : '<div class="media"><a href="#" class="pull-left"><img src="../images/avatar-tiny.jpg" class="media-object" alt="Sample Image"></a><div class="media-body"><h4 class="media-heading">Jhon Carter</h4><p>Excellent Bootstrap popover! I really love it.</p></div></div>'
});
$(document).on("click", ".popover .close" , function(){
$(this).parents(".popover").popover('hide');
});
});
</script>
e richiamando il tutto con
data-toggle=""
non so tutt'ora come mai. ma.. funziona!
😝👋
Grazie a tutti per l'aiuto! :)
Discussione seguita da
Pagine → 1 2
Rispondi alla Discussione Segui Discussione Inoltra Discussione Forum Programmazione, Open Source e Hosting Elenco Forum
Articoli, Interviste e altre Risorse!
RAID Shadow Legends ↗
New Orleans ↗