javascript - Fix div position and load mouse over content over another div using z-index -


my data correctly alerting data on mouseover on div, m still struggling css weakness. need display data on rightsideblock div using z-index property on mouseover instead of alerting. created class mydatatoshow hold data rhe display set none not able configure correctly. me googled lot. kindly suggest links may helpful developers fixing css issues.

edit 1 more problem im facing event on adding code --var mydata = $(this).text(); $('.mydatatoshow').append(mydata); adds data corectly div want on mouse out data vanishes

my css --

<style type="text/css"> .container{width:999px;} .leftsideblock{float:left; border:1px solid green;width:674px;} .rightsideblock{border:5px solid blue;} </style> 

my body content --

<body> <div class="container"> <div class="leftsideblock"> <div class="mydivdata"> <table width="650" border="0"> <tbody> <tr> <td width="90" valign="top" rowspan="2" class="myimageclass">&nbsp;</td> <td width="193" valign="top">monday 07 july 2012</td> <td width="424"> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. </td> </tr> </tbody> </table> </div> <div class="mydivdata"> <table width="650" border="0"> <tbody> <tr> <td width="90" valign="top" rowspan="2" class="myimageclass">&nbsp;</td> <td width="193" valign="top">friday 06 july 2012 8:00am</td> <td width="424"> duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. </td> </tr> </tbody> </table> </div> </div> <div class="mydatatoshow" style="display:none;"> </div> <div class="rightsideblock"> <p> right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data.this right sidebar data. </p> </div> </div> </body> 

my js--

<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script> <script type="text/javascript"> $(document).ready(function(){ $('.mydivdata').mouseover(function(){ var mydata = $(this).text(); alert(mydata); }); }); </script> 

here's jsfiddle: http://jsfiddle.net/jsndc/

try this:

 $('.mydivdata').mouseover(function(){ $('.mydatatoshow').css('z-index', '9999'); }); 

see this , this position div correctly.


Comments

Popular posts from this blog

javascript - backbone.js Collection.add() doesn't `construct` (`initialize`) an object -

php - Get uncommon values from two or more arrays -

Adding duplicate array rows in Php -