我在这里使用了一个很棒的Javascript弹出气球http://file.urin.take-uma.net/jquery.balloon.js-Demo.html。
以下代码功能强大,但在页面加载时默认显示气球。如何使气球在加载时隐藏,并仅在单击图像时显示?:
<script>
$(function() {
$("#myballoon > img").showBalloon({
position: "right",
css: {}
}).toggle(function() { $(this).hideBalloon(); }, function() { $(this).showBalloon(); });
});
</script>谢谢!
发布于 2013-06-19 17:59:03
将此css添加到您的页面:
#myballoon > img { display:none; }也就是说,假设showBallon()作用于图像,而不是父元素(#myballoon)
发布于 2013-06-19 18:00:45
默认情况下,使用Jquery.Just add on document ready就可以了。
$("#myballoon > img").hide();https://stackoverflow.com/questions/17188062
复制相似问题