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?
here is my case: <html> <body> <head> … <script> $(function(){ $(‘.do-tip’).qtip({ content: ‘This is
Share
While it is not perfectly clear what you are trying to do, I will try my MagicGuess tool and offer you an answer.
So, you need to
a) perform some functionality on document load; this functionality does something with all
.do-tipelements on the pageb) perform the same functionality after you load something via AJAX, but now this needs to operate with another set of elements.
Is that true? If so, here is what I would do:
and call
doEverythingINeedwith another selector after you load your HTML via AJAX. If you use$.ajax()function, then you should just doHope that helps!