prima versione popover

This commit is contained in:
nicola 2022-12-13 13:44:39 +01:00
parent e1857bb683
commit f2ef6dac94
1 changed files with 10 additions and 1 deletions

View File

@ -45,6 +45,14 @@ $(document).ready(function() {
showCantica('Paradiso') showCantica('Paradiso')
$("[data-cg]").hover(function() {
var idspan = $(this);
var value = $(this).text();
var cg = $(this).data("cg");
// alert('fava '+ value + " "+cg);
$(this).popover({title: "Categoria", content: cg, trigger: "hover"});
});
// prima cantica // prima cantica
$('#cantica1').on('click', function() { $('#cantica1').on('click', function() {
@ -312,7 +320,8 @@ $(document).ready(function() {
var spanoccorrenza = $('<span />') var spanoccorrenza = $('<span />')
var pos = parseInt(element.pos) var pos = parseInt(element.pos)
spanoccorrenza.attr('id', element.cantica + "_" + element.canto.replace(" ", "_") + "_" + element.numverso + "_" + pos) spanoccorrenza.attr('id', element.cantica + "_" + element.canto.replace(" ", "_") + "_" + element.numverso + "_" + pos)
spanoccorrenza.attr('cg', element.catgramm) spanoccorrenza.attr('data-cg', element.catgramm)
if (listarisultati.length > 0 && listarisultati.includes(spanoccorrenza.attr('id'))) if (listarisultati.length > 0 && listarisultati.includes(spanoccorrenza.attr('id')))
spanoccorrenza.attr('class', "font-weight-bold mark ") spanoccorrenza.attr('class', "font-weight-bold mark ")
spanoccorrenza.append(element.form.replaceAll("%20", " ")) spanoccorrenza.append(element.form.replaceAll("%20", " "))