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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.