I'm trying to add some line break to the text of the plugin qTip2 without any success.
So far I've tried <br/>
, <p>
and also white-space: pre-line
without any success.
You can view a full example http://jsfiddle.net/6asMt/1/
I've been searching around the google but can't find anything that works. I would like my final result to be:
Date Start: 2014-04-08 10:00:00
Date End: 2014-04-10-10-00-00
And not
Date Start: 2014-04-08 10:00:00 Date End:
2014-04-10-10-00-00
Please check this JS Fiddle Code
JS Code:
$('a').each(function () {
if ($(this).hasClass('qTip')) {
var value = $(this).next('div:hidden').text();
var title = $(this).attr('title');
$('.qTip').qtip({
style: {
classes: 'qtip-bootstrap'
},
content: {
title: title,
//text: value // The problem is here (on the `text` option)
text: $(this).next('div')[0].innerHTML
}
});
}
});
If you have any other issue, then please add a comment below.
Regards D.