jquery - my tooltip is cut off by the div container -


i have code make appear tooltip when message box "hovered". message boxes inside div called chatbox.

$('.box').hover(function(){      var htmltooltip = '<div id="info" class="shadow">';      htmltooltip += '<h4>label info</h4>';      htmltooltip += '<img src="images/defaultphoto.gif"/>';      htmltooltip += '</div>';      $(this).append(htmltooltip).children('#info').hide().fadein(400).css('left', -150);      }, function() {          $('#info').remove();      }    ); 

this css code chatbox, box , tooltip called #info

#chatbox {      position: absolute;     overflow-y:auto;      top:40%;     left:50%;     background:#fff;     height:80%;     width:550px;     border:3px solid black;     } .box{     width:90%;     height:auto;     margin:5px 20px 0px 0px;     border:3px solid #918750;     float:left;     cursor: pointer; } #info{     position:absolute;     display:block;     background:#7f7777;     width:300px;     padding-bottom: 0.5em;     z-index:25;   } 

my problem tooltip cut off chatbox div when pass limits of chatbox. here jsfiddle: http://jsfiddle.net/ifalcao/k9yrc/2/

the overflow rule in chatbox div must exist, otherwise if have many message boxes, pass limit of chatbox. (http://jsfiddle.net/ifalcao/urbde) need message boxes inside chatbox tooltips of message boxes outside chatbox.

thanks in advance.

remove overflow-y:auto; rule #chatbox div , tooltip visible.

jsfiddle example


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -