Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var mytriggerid = 0;
- $('.todo_o ').mouseover(function(ev) {
- if (mytriggerid){
- $('#tooltip').remove();
- removeTimeout(mytriggerid);
- }
- mytriggerid = setTimeout(function()
- var todo_id = $(this).children().attr("href").match(/todo_id=([0-9]+)/)[1];
- $.get("todo.php?action=ajax&todo_id=" + todo_id , function(data) {
- $("body").append('<p id="tooltip"></p>');
- $('#tooltip').append(data).css("top",(ev.pageY + -20) + "px").css("left",(ev.pageX + 40) + "px").show();
- });
- ), 100);
- }).mouseout(function(){
- $('#tooltip').remove();
- removeTimeout(mytriggerid);
- });
Add Comment
Please, Sign In to add comment