Search code examples
jqueryhtmltwitter-bootstrappopover

text direction right to left (rtl) inside popover bootstrap


I try to code a simple popover that appears on hover, pretty easy so far. the problem is that I want to write the title not in English in fact I want to write the title in Hebrew. As you all know the direction of the language is rtl and not ltr. My problem is that I cant change the direction of the text property, already tried to use class= pull-right.

here is the code:

$(document).ready(function(){
$('#start').popover({
    html : true, 
    content: "as you can see the hebrew text doesnt fit the title",
    title: "<div class='pull-right'>שלום</div>",
    placement : "bottom",
    trigger: "hover"


    });   


});

here is the link to test the code


Solution

  • Remove the div tag around שלום, and write in your css:

    .popover-title {text-align: right;}
    

    Here is your example