EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: samuelzhu001 on May 10, 2020, 11:09:26 PM



Title: z-index of tooltip takes no effects after reposition method calls
Post by: samuelzhu001 on May 10, 2020, 11:09:26 PM
like this:
   $('#prompt').tooltip({
            position: 'top',
            content: $('#promptContent').html(),
            onShow: function () {
                $(this).tooltip('tip').css({
                    zIndex:99999     // I want it to be top of all
                });
               //  $(this).tooltip("reposition");  //when uncomment this line, the z-index value is undefined. the tooltip is covered by other elememts which have big z-index.
            }
        });


Title: Re: z-index of tooltip takes no effects after reposition method calls
Post by: jarry on May 12, 2020, 12:13:42 AM
You can set the 'zIndex' property value while creating the tooltip component.
Code:
$('#prompt').tooltip({
  position: 'top',
  zIndex: 99999,
  ...
})


Title: Re: z-index of tooltip takes no effects after reposition method calls
Post by: samuelzhu001 on May 12, 2020, 04:55:13 AM
fine.
Perhaps the zIndex property should be included in the documentation.