jquery - Tooltipser popup not working for the first mouse over -


i using tooltipser popup in page.

and content of tooltipser updating ajax.

they working well, if there no image in content.

but if there image in ajax content, position of tooltipser first time not correct. second time onwards, comes on correct position (ie on top position)

can 1 know reason?

following code

<script>  $(document).ready(function() { $('#test_link').tooltipster({     interactive:true,        content: 'loading...',     functionbefore: function(origin, continuetooltip) {          // we'll make function asynchronous , allow tooltip go ahead , show loading notification while fetching our data         continuetooltip();          // next, want check if our data has been cached         //if (origin.data('ajax') !== 'cached') {             $.ajax({                 type: 'post',                 url: 'example.php',                 success: function(data) {                     // update our tooltip content our returned data , cache                     origin.tooltipster('content', $(data)).data('ajax', 'cached');                 }             });       //  }     } });      });     </script> 

example.php

<?php echo "<img src='flag.jpg'>"; ?> 

this answered in github issues list. https://github.com/iamceege/tooltipster/issues/111


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -