Search code examples
jquerydjangodjango-templatesqtip2

JQuery Qtip2 text over multiple lines (in Django project)


I am trying to integrate QTip2 tooltips into my Django template.

$(document).ready(function(){
$("#category_1").qtip({
    content: {
        text: '{{ categories.category_1_helptext }}'
        }
    });
});

This works very well, as long as the helptext in the database is only one line long. Is there a way to use a string over two lines with QTip2? Things like <br> or "\n" don't work.


Solution

  • Are you sure <br> doesn't work? If I use |linebreaksbr filter, it breaks lines very clearly.