I want to display a tooltip using twitter bootstrap in rails. The tooltip is to be displayed on page load. So for doing this I have added the following in my markup of the field:
rel="tooltip" title="Press CTRL+C To Copy"
And then I have added the following code into my application.js file:
window.onload = function(){
var text_input = document.getElementById ('url_copy');
text_input.focus ();
text_input.select ();
$('#url_copy').tooltip('show')
}
Fortunately it’s displaying the tooltip. Nut unfortunately it’s displaying it on the top. But I want to place it on right. I know I have to use a placement: ‘right’ or something like that as mentioned http://twitter.github.com/bootstrap/javascript.html#tooltips
But how should the code exactly look like??
Thanks in Advance…
On the page that you linked it shows you examples.
To place it on the right use the following html.
http://twitter.github.com/bootstrap/javascript.html#tooltips