how to display and hide text on mouse over using jquery or javascript? -
function hover() { //display inside div id=dynamicdivfirstmodule } function hoverclear() { //clear// }
<div id="dynamicdivfirstmodule" > <%-- dynamic div--%> <div id="dynamicdiv" style="display:none; border:solid;" > <table> <tr> <td class="auto-style1" rowspan="2"> <asp:textbox id="textbox" textmode="multiline" runat="server" readonly="true" style="overflow:auto;" height="102px" width="235px"></asp:textbox> </td> <td id="hoverhere"> <p id="hover" class="mastertooltip" onmouseover="hover();" onmouseout="hoverclear()">?</p> </td> </tr> <tr> <td> <asp:button id="delete" runat="server" text="delete" cssclass="removediv" /> </td> </tr> </table> </div> <%-- dynamic div--%> </div>
as said want text appear on mouse pointer tip developed code, might you.
html
<div>a</div> <div>b</div> <span id="textspan" style="display:none;position:absolute;"></span>
css
div{ width: 10px; cursor :default; }
js
$(document).ready(function(){ $("div").on('mouseover',function(e) { var div = $(this).html(); $("#textspan").html(div).css({left:e.pagex, top:e.pagey-15}).show(); }); $("div").on('mouseout',function(e) { $("#textspan").hide(); }); });
Comments
Post a Comment