Añadir salto de línea a la información sobre herramientas en Bootstrap 3


Estoy usando Bootstrap 3 y agregué un tooltip a mi div. He intentado usar \n y crear la nueva línea. ¿Sería un problema que el Bootstrap me detuviera?

<div class="content show-tooltip" data-placement="top" 
     data-original-title="1st line of text <br> 2nd line of text">
Author: Pierce McGeough, 2013-09-25

2 answers

Necesita agregar data-html="true" al marcado..

<div class="content show-tooltip" data-html="true" data-placement="top" 
     title="1st line of text <br> 2nd line of text">

Demostración de trabajo: http://www.bootply.com/83099

 174
Author: Zim,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-09-25 10:02:51

En el Título use este código para romper la línea:

HTML

...title="- Item 1 &#013; - Item 2 &#013;"

CSS

.ui-tooltip {
    /* tooltip container box */
    white-space: pre-line;
}

.ui-tooltip-content {
    /* tooltip content */
    white-space: pre-line;
}
 0
Author: Thalles Noce,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2017-11-25 20:20:52