I would like to add some text to the header of a jquery UI tab control (see image). It would be good if I could align it on the right side.
Something like this
$("#id_of_tab_element").tabs(); //init of your tabs element
var textElement = $("<span></span>");
textElement.text("text here...");
apply styles and append
textElement.css('position', 'absolute');
textElement.css('right', '20px');
$("#id_of_tab_element").append(textElement);
you could also define the styles in css and apply a class to the element
See this fiddle
<ul class="ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all">
<li class="ui-state-default ui-corner-top ui-tabs-selected ui-state-active"><a href="#tabs-1">Nunc tincidunt</a></li>
<li class="ui-state-default ui-corner-top"><a href="#tabs-2">Proin dolor</a></li>
<li class="ui-state-default ui-corner-top"><a href="#tabs-3">Aenean lacinia</a></li>
<span style="float: right;">hello</span>
</ul>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With