开发者

jquery live with "bstip" tooltip?

开发者 https://www.devze.com 2023-03-20 14:31 出处:网络
I\'m using bstip to have some nice tooltip on my images. I load my images with an ajax call to get: <img src=\"1.jpg\" class=\"开发者_如何学运维bslink\" title=\"exemple\" />

I'm using bstip to have some nice tooltip on my images.

I load my images with an ajax call to get:

<img src="1.jpg" class="开发者_如何学运维bslink" title="exemple" />
<img src="2.jpg" class="bslink" title="exemple" />

but when using

$('.bslink').bstip();

it's not working.

How can I use 'live' with jQuery in this case?


Output

<img src="1.jpg" class="bslink" title="exemple" />
<img src="2.jpg" class="bslink" title="exemple" />

<script>
$(function(){
    $('.bslink').bstip();
});
</script>

from ajax response and it should work fine


You don't need .live() to accomplish this. Simply place $('.bslink').bstip(); in your AJAX call's success method.

0

精彩评论

暂无评论...
验证码 换一张
取 消