EasyUI Forum
October 17, 2025, 03:40:27 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: The problem of executing events in tooltip  (Read 6150 times)
officecode
Jr. Member
**
Posts: 69


View Profile Email
« on: September 25, 2017, 07:26:55 PM »

Hi, everybody. First of all, thanks for Jarry's help, and now I have another question: why aren't the events in tooltip executed? I guess this may have been caused by the blur incident, but I don't know how to solve it:
Code:
<a class="tt">aa</a>
<a class="tt">bb</a>
<script>
$(function () {
$('.tt').each(function(){
$(this).tooltip({
hideEvent: 'none',
content: $('<div></div>'),
onUpdate:function(content){
var str = $(this).text();
content.panel({
title:'panel',
iconCls:'icon-tip',
width: 100,
height:100,
content: '<a href="javascript:;" onclick="alert(\''+str+'\')">'+str+'</a>',
});
},
onShow:function(e){
var opts = $(this).tooltip('options');
$(opts.content).panel('resize');
var t = $(this);
t.tooltip('tip').focus().blur(function(){
t.tooltip('hide');
});
}
});
})
})
</script>
« Last Edit: September 25, 2017, 07:28:44 PM by officecode » Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: September 26, 2017, 07:04:26 AM »

Please look at this example http://code.reloado.com/akohuf3/edit#preview
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!