i try to trigger someFunction()
before the qtip is created
$('.selector').qtip({
content: {
text: someFunction(this.id) }
});
This code works but i think this is a dirty solution. Is there maybe a start: event
like in the most jquery plugins (for example draggable)? I found nothing about this it in the documentation.
EDIT: Ok, this code wont work. He trigger the function on pageload and not onhover.
UPDATE:
function someFunction(someId)
{
// some code ...
var searchResult = ' ... some results from the search -> from '+someId+' ... ';
return searchResult;
}
content: { text:
only write it once on page load – Tropaeolin