当我将鼠标悬停在站点中的某个元素上时,我想显示带有标题的气球消息。我看到了jQuery代码,但我不知道我是否正确使用了它。
这是我的代码:
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script type="text/javascript" src="./js/jquery.balloon.js">
</script>
<script>
$(document).ready($(function() {
$('#style1').balloon({ position: "bottom right"});
});
</script>
</head>
<body>
<div id="wrap">
<button id="style1" onclick="getValue('./CSS/style1.css')">style1</button>
</div>
</body>你能帮我找到我用过的http://file.urin.take-uma.net/jquery.balloon.js-Demo.html链接吗?
发布于 2013-06-16 15:24:49
有几件事可能是错误的,但也有一些确定的地方。
title属性时才会生成气球。你的button不需要。确保它具有title属性。
./js/jquery.balloon.js,尝试按f12并转到console选项卡,查看是否发现任何错误。发布于 2013-06-16 15:42:26
将title属性添加到按钮
<button id="style1" onclick="getValue('./CSS/style1.css')" title="Some">style1</button>发布于 2013-06-16 16:03:39
缺少标题。< title="YourTitleHere" id="style1“onclick="getValue('./CSS/style1.css')”button >
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js">
</script>
<script type="text/javascript" src="./js/jquery.balloon.js">
</script>
<script>
$(document).ready($(function() {
$('#style1').balloon({ position: "bottom right"});
});
</script>
</head>
<body>
<div id="wrap">
<button id="style1" onclick="getValue('./CSS/style1.css')" title="YourTitleHere">style1</button>
</div>
</body>https://stackoverflow.com/questions/17131019
复制相似问题