通过ajax注入html,RE-RUN document.ready()jqueries,IS可能吗?
here is my case:
<html>
<body>
<head>
...
<script>
$(function(){
$('.do-tip').qtip({
content: 'This is a tip of active hovered element',
show: 'mouseover',
hide: 'mouseout',
})
});
</script>
</head>
<body>
<a href="http://www.google.com" class="do-tip">google</a>
<input type="button" value="load div by ajax" />
<div> <!-- this div loaded by ajax -->
<div>
<a href="http://www.yahoo.com" class="do-tip">yahoo</a> <!-- HOW TO HERE, run the existing script only for this part, JQUERY UNCLE must have a solution-->
</body>
</html>
any ideas?
没有找到相关结果
已邀请:
3 个回复
锑寝粒
元素相关 b)通过AJAX加载东西后执行相同的功能,但现在需要使用另一组元素进行操作。 真的吗?如果是这样,我会这样做:
在通过AJAX加载HTML后,使用另一个选择器调用
。如果你使用
功能,那么你应该这样做
希望有所帮助!
死搭胯
弛保矮瘦敖