Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我如何在 1 秒后自动关闭 jQuery UI Tooltip Widget。我使用以下代码:
var du=1000; $(document).tooltip( {show:{effect:'slideDown',delay:du,duration:du/2}}, {hide:{effect:'explode',pieces:20,duration:du,delay:du/4}}, {track:true} );
尝试:
$(document).ready(function () { var du = 1000; $(document).tooltip({ show: { effect: 'slideDown' }, track: true, open: function (event, ui) { setTimeout(function () { $(ui.tooltip).hide('explode'); }, du); } }); });
小提琴
希望这可以帮助!