Search code examples
jqueryjquery-uijquery-pluginstooltip

How to add right (horizontal) arrow in jquery UI tooltip?


I am using the jQuery UI tooltip but I am not able to add right arrow to a tooltip.

I am following this link

I mean I am able to add top & bottom arrow, but not a right & left one.


Solution

  • Here is the Working Fiddle

    $(document).ready(function() {
        var position = { my: 'left center', at: 'right+10 center' };   
        position.collision = 'none';
        $('input[type="text"]').tooltip();
        $('input[value="right"]').trigger('change');
        $('input[type="text"]').tooltip('option', 'position', position);
        $('input[type="text"]').tooltip('option', 'tooltipClass', 'right');
    
    });