我正在尝试通过 ajax 显示 qtip 弹出窗口,但没有成功。我得到了以下代码,但似乎无法检测到哪里出了问题。帮助将不胜感激。
<script type="text/javascript">
$(document).ready(function()
{
$('.tiplink').qtip({
content:{
var id = $(this).attr('rel');
text: '<img class="" src="../images/loader.gif" alt="Loading..." />',
ajax:{
url: 'pops.php',
type: 'POST',
loading: false,
data: 'id=' + id
}
},
show: 'mouseover', // Show it on mouseover
hide: {
delay: 200,
fixed: true // We'll let the user interact with it
},
style: {
classes: 'ui-tooltip-light ui-tooltip-shadow',
width: 290
}
});
});
</script>
<a href="#" class="tiplink" rel='1'>show me the popup1!</a>
<a href="#" class="tiplink" rel='2'>show me the popup2!</a>
<a href="#" class="tiplink" rel='3'>show me the popup3!</a>