I have code on my page that applies qtip to images. It displays dynamic content for each image through an ajax post. But it does not display qtip after closing the dialog box of the Thickbox / JQuery interface and causes an error: $ (this) .qtip is not a function
<script src="<%= Config.VirtualDir %>js/jquery.js?v=2" type="text/javascript"></script>
<script src="<%= Config.VirtualDir %>js/jquery.qtip-1.0.0-rc3.min.js?v=2" type="text/javascript"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
BindQtip();
});
function BindQtip()
{
$('image').each(function(){
$(this).live('click',function() {
var $img = $(this);
if('<%= objAdminAuth.GetUserID() %>' == $img.attr('data-uid').split('|')[0])
{
return false;
}
if ($img.data('qtip')) {return false;}
$(this).qtip({
content: 'Loading...',
style: {
border: {
width: 5,
radius: 10
},
padding: 0,
textAlign: 'center',
tip: true,
name: 'dark'
},
hide: 'unfocus',
show: {
when: 'click',
ready: true,
solo: true
},
position: {
corner: {
tooltip: 'rightMiddle',
target: 'bottomLeft'
}
},
api: {
onRender: function() {
var self = this;
self.content = '';
$.ajax({
url: window.location.href,
type: 'POST',
data: 'call=ajax&uid=' + $img.attr('data-uid'),
success: function(resp) {
self.updateContent(resp);
}
});
},
onContentUpdate: function() {
var self = this;
}
}
});
});
});
}
</script>
The whole way is right and everything works fine. Did I miss something?
Any help would be appreciated.
source
share