开发者

JQuery Toggle image AND another div height

Not sure if this can be done, but I would like to toggle an image (easy) BUT at the same time increase/decrease the height of another div based on the "open/close" of the toggle. I can get it to increase on click, but not on the "close" any suggestions please

$j('#headerImageToggle').live('click',function(){
$j(this).next('div').slideT开发者_如何学JAVAoggle('slow',function(){
I assume something goes in here?
});
});


$j('#headerImageToggle').live('click',function(){
  var nextDiv = $j(this).next('div');
  nextDiv.slideToggle('slow',function() {
    if (nextDiv.is(':visible')) {
      // decrease height
    } else {
      // increase height
    }
  });
});
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜