Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

does events inherited from parentsQ


ghost's Avatar
0 0
<li 
onclick="func();" 
onmouseout="slideup('desc_15');" 
onmouseover="slidedown('desc_15');" class="sitewidget">
	<div class="widgetcontent" id="15"> 
		<img width="60" height="60" />
		<h2>abc</h2>
		<span class="more">
			<a style="cursor: pointer;" href="javascript:load('9b',0)">Read more...</a>
		</span>
	</div>
	<div class="widgetlinks" style="overflow: hidden; display: block; height: 100px;" id="desc_15">
		some contentsome content..
		some contentsome content..
		some contentsome content..
	</div>			
</li>

this is the code. so as it shows onmoveover the div 'desc_15' should slidedown. and onmouseout it should slide up.

its just a collapse and expand functionality with sliding effect.

the problem is these events occur of every mouseover and mouseout on the internal elements of the 'li' tag. which i am expecting to occur only for li tag.

i mean.. when i move mouse from the imagetag(inside li) to h2tag(inside li) the div slidesup and when i move to other internal element of li the div slidesdown

i am defining the events for the parent ( li tag) so moving mouse from one child element to other child element is not equal to mouseout for the parent element. mouse is still in the parent element only. then why is it considering it as mouseout eventQ?


ghost's Avatar
0 0

claws wrote: this is the code. so as it shows onmoveover the div 'desc_15' should slidedown. and onmouseout it should slide up.

Have you tried putting the onmouseover and onmouseout events in the div instead? Since the div is directly under your list, the div itself contains everything in your "sidebar".

(Why do you have a div inside of a list?)