Hello,
I´m using qtip2 tooltips and want to call the tooltip with ajax and a data id attribute.
I´ve items "ajaxContent1.html, ajaxContent2.html", which i want to call with the data id attribute inside of my tooltip. Now i have the problem, that the tooltip doesn´t load the content of the files.
Here is my code:
<script type="text/javascript">
// Create the tooltips only when document ready
$(document).ready(function()
{
// MAKE SURE YOUR SELECTOR MATCHES SOMETHING IN YOUR HTML!!!
$('a').each(function() {
$(this).qtip({
content: {
text: 'Loading...',
ajax: {
url: 'http://www.example.de/items/ajaxContent.html?id=' + $(this).data('id'),
loading: false
}
},
position: {
viewport: $(window)
},
style: 'qtip-wiki'
});
});
});
</script>
And now i want to call the tooltip with:
<a href='#' data-id='1' >Test</a>