i have more blocks:
<div class="static"> <div class="more-less"> <div class="more-block"> <p><?php echo staticpagemodule::getdata(4)->body; ?></p> </div> <div class="button"> <a class="adjust" href="<?php echo staticpagemodule::geturl(4); ?>">more</a> <div class="triangle"></div> </div> </div>
how refer more-block class on adjust click?
i'm trying:
$(".adjust").toggle(function() { $(this).parents(".more-block").css("height", "auto").css("overflow", "visible"); }
thanks reply!
.more-block
not parent of .adjust
. it's sibling of .button
, .adjust
's parent. need change query this:
$(this).parent().prev().css("height", "auto").css("overflow", "visible"); ^-------^ div.button ^-----^ div.more-block
Comments
Post a Comment