Content/jqueryui/tests/visual/tooltip/tooltip.html
(开头部分) 5KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Tooltip Visual Test: Default</title>
<link rel="stylesheet" href="../../../themes/base/jquery.ui.all.css">
<script src="../../../jquery-1.9.1.js"></script>
<script src="../../../ui/jquery.ui.core.js"></script>
<script src="../../../ui/jquery.ui.widget.js"></script>
<script src="../../../ui/jquery.ui.position.js"></script>
<script src="../../../ui/jquery.ui.button.js"></script>
<script src="../../../ui/jquery.ui.tooltip.js"></script>
<style>
.group {
margin-top: 2em;
}
</style>
<script>
$(function() {
// default
$( "#context1, form, #childish, #nested-input" ).tooltip();
// custom class, replaces ui-widget-content
$( "#context2" ).tooltip({
tooltipClass: "ui-widget-header"
});
$( "#right1" ).tooltip({
tooltipClass: "ui-state-error"
});
// synchronous content
$( "#footnotes" ).tooltip({
items: "[href^='#']",
content: function() {
return $( $( this ).attr( "href" ) ).html();
}
});
// asynchronous content
$( "#async" ).tooltip({
content: function( response ) {
setTimeout(function() {
response( "I loaded <strong>asynchronously</strong>!" );
}, 1000 );
return "Loading...";
}
});
// asynchronous content with caching
var content;
$( "#async2" ).tooltip({
content: function( response ) {
if ( content ) {
return content;
}
setTimeout(function() {
content = "<strong>Hello</strong> world!";
response( content );
}, 1000 );
return "Loading...";
后面还有 146 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
