Jump to content

Jquery Show/hide Problem


severndigital

Recommended Posts

I am trying to show / hide some divs inside another div, I am running into a problem.

here is my code

<script>
function showTools()
{
$('#toggle').show('blind');
}

function hideTools()
{
$('#toggle').hide('blind');
}

</script>
<h1>Test Area</h1>

<div id="wrapper" style="height:150px; width:125px; border:1px solid black;" onmouseover="showTools();" onmouseout="hideTools();">
<div id="toggle" class="span-3 last hideMe">
<div id="tool1" class="span-1">
 Tool
 </div>
 <div id="tool2" class="span-1">
 Tool
 </div>
 <div id="tool3" class="span-1 last">
 Tool
 </div>
</div>
</div>

<script>
$(function(){$('.hideMe').hide();});
</script>

 

the problem is when I enter the "revealed" div, it counts as a "onmouseout" command on the wrapper div and hides the toggle div. once the div is gone it counts as a "onmouseover" on the wrapper div and the toggle div appear again. This loops over and over until you move off the wrapper div.

 

I know why it's happenen, but I have no idea how to fix it.

 

Any help would be great.

 

thanks,

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.