html - open a div on specific position with jquery -
i've created 2 divs, second div opens on hover inside first div incresed postion of second div double of first 1 , in 1 box i've such 8 divs want 2nd divs open in boxes body how can set postion of div placed @ bottom open bottom top mean should not cross body of boxes
my code:
<html> <head></head> <body> <div class="boxes"> <div class="box1"> <div class="box_onhov"> div appear on hovering box1 , double in size of box1 </div> </div> <div class="box2"> <div class="box_onhov"> div appear on hovering box1 , double in size of box1 </div> . . . . <div class="box8"> <div class="box_onhov"> div appear on hovering box1 , double in size of box1 </div> </div> </body> </html>
the boxes adjusted 4 in 1 row when hovers on first div div_onhov covers , div @ bottom of when hover on bottom div means on div 5 should not cross body , must display bottom top. same 4th div should not displyed right must display inside outer div left.
this can make animation width or height
$('.box1').hover(function(){ $(".box_onhov").toggle(function(){ $(.box_onhov).animate({height:40},200); },function(){ $(.box_onhov).animate({height:0},200); }); });
Comments
Post a Comment