diff --git a/js/cesareBrowse.js b/js/cesareBrowse.js index cbf0345..1a38b6e 100644 --- a/js/cesareBrowse.js +++ b/js/cesareBrowse.js @@ -45,6 +45,14 @@ $(document).ready(function() { 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 $('#cantica1').on('click', function() { @@ -312,7 +320,8 @@ $(document).ready(function() { var spanoccorrenza = $('') var pos = parseInt(element.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'))) spanoccorrenza.attr('class', "font-weight-bold mark ") spanoccorrenza.append(element.form.replaceAll("%20", " "))