如何获取jquery Tooltipster插件为新创建的DOM元素工作? [英] How to get jquery Tooltipster Plugin to work for newly created DOM elements?

查看:135
本文介绍了如何获取jquery Tooltipster插件为新创建的DOM元素工作?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Tooltipster插件 http://calebjacob.com/tooltipster/ ,这是非常好的,但我有动态生成的内容这被插入到DOM中。似乎tooltipster正在检测到它们被设置为触发文档就绪。



我知道这是一个深奥的插件,但是有关如何让插件适用于DOM中新创建的元素的任何想法?



谢谢

解决方案

尝试这一个



函数(event){
$(this).tooltipster({multiple:true});
});


I'm using the Tooltipster plugin http://calebjacob.com/tooltipster/ which is great but I have dynamically generated content that's being inserted into the DOM. It doesn't seem like tooltipster is detecting those as it's being set to trigger on Document Ready.

I know this is a bit of an esoteric plugin but any ideas on how to get the plugin to work for newly created elements in the DOM?

Thanks

解决方案

Try this one

$(document).on('mouseover', '.ololo', function(event) { $(this).tooltipster({multiple:true}); });

这篇关于如何获取jquery Tooltipster插件为新创建的DOM元素工作?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆