Difference between revisions of "Template:Copenhagen-Header"

Line 908: Line 908:
 
});
 
});
  
$('a[data-toggle="tooltip"]').tooltip({
+
$(document).on("click", ".tooltip", function() {
    animated: 'fade',
+
    $(this).tooltip(
    placement: 'bottom',
+
        {  
    trigger: 'click'
+
            items: ".tooltip",  
 +
            content: function(){
 +
                return $(this).data('description');
 +
            },  
 +
            close: function( event, ui ) {
 +
                var me = this;
 +
                ui.tooltip.hover(
 +
                    function () {
 +
                        $(this).stop(true).fadeTo(400, 1);
 +
                    },
 +
                    function () {
 +
                        $(this).fadeOut("400", function(){
 +
                            $(this).remove();
 +
                        });
 +
                    }
 +
                );
 +
                ui.tooltip.on("remove", function(){
 +
                    $(me).tooltip("destroy");
 +
                });
 +
          },
 +
        }
 +
    );
 +
    $(this).tooltip("open");
 
});
 
});
 +
 +
  
 
</script>
 
</script>

Revision as of 09:54, 31 October 2017