我目前使用twitter bootstrap添加工具提示。twitter引导工具提示与图像
继承人我JS:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<link rel="stylesheet" type="text/css" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css"/>
<script src="http://twitter.github.com/bootstrap/assets/js/bootstrap-tooltip.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("a img").tooltip({'placement': 'right'});
});
</script>
我想的图像与具有rel ATTR的jQuery追加了这样的提示:
$(".info").append('<a href="#" rel="tooltip" title="first tooltip"><img src="http://extrarewards.nationalexpress.com/images/assets/info_icon.png"/></a>');});
没有这个作品的形象,但只要我在其中添加图像停止工作。
任何想法上述有什么问题?
向我们展示你的HTML代码也 – Cherniv
这是php这样的HTML是动态生成 – danyo
这样告诉我们创建PHP代码'img' – Cherniv