Jump to content

help me hiding id in <div>


venky_lb

Recommended Posts

pls find the script below , 

if  it is toggle_tt ,then second_toggle_tt id should be hidden ,vice versa

 

 

 

<script type="text/javascript">

function toggle_tt(id, status, xpos,ypos){

 

  document.getElementById(id).style.display = (status == 'show') ? "inline" : "none";

  document.getElementById(id).style.left = xpos +2  ;

  document.getElementById(id).style.top =  ypos +2;

}

function second_toggle_tt(id, status, xpos,ypos){

 

  document.getElementById(id).style.display = (status == 'show') ? "inline" : "none";

  document.getElementById(id).style.left = xpos +2  ;

  document.getElementById(id).style.top =  ypos +2;

}

</script>

  </head>

  <body>

    <div id="tooltip" class="dynarch-tooltip" onmouseout="toggle_tt('tooltip','hidden')">

      <div class="dynarch-tooltip-title">user id</div>

      Enter <b>your</b> name

    </div>

    <img src="images/imagespop.jpg"  onmouseover="toggle_tt('tooltip', 'show', event.clientX, event.clientY)"  /><br />

 

<div id="tooltip" class="dynarch-tooltip" onmouseout="second_toggle_tt('tooltip','hidden')">

      <div class="dynarch-tooltip-title">user id</div>

  <b> hello</b>

 

    <a="#" onmouseover="second_toggle_tt('tooltip', 'show', event.clientX, event.clientY)"  >?</a>

  </body>

</html>

 

Link to comment
https://forums.phpfreaks.com/topic/115005-help-me-hiding-id-in/
Share on other sites

im using two div part which calls functions,

 

1.i ve used onmouseover and mouseout event handlers

2.the logic behind the code is if omnouseover an image  toggle_t  and  onmouseout the div id of the image is hidden,which means the function should be stopped ,

 

but my function idoesnt stops.

 

 

 

pls copy the code and run it for better understanding

Link to comment
https://forums.phpfreaks.com/topic/115005-help-me-hiding-id-in/#findComment-591435
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.