anonamas
anonamas

Reputation: 241

jQuery animate height with following content

I am expanding a div with jQuery animate. However inside that div I have another div which I want to follow with the expansion and always be at the bottom to the right.

This is the jquery code

$( ".top-button" ).click(function() {
    $('.top-menu').animate({ height: 110 }, 800);
});

I am guessing it is something CSS related?

JsFiddle

Upvotes: 0

Views: 72

Answers (1)

Praveen
Praveen

Reputation: 56509

You can try this

$(document).ready(function() {
$( ".top-button" ).click(function() {
    $('.top-menu').animate({height:110},800);
    $('.top-button').animate({bottom:0},800);
   });
});

JSFiddle

Upvotes: 1

Related Questions