Jack
Jack

Reputation:

Resizable DIV only horizontally

I need a plugin to resize a DIV vertically just use jQuery ( not jq UI ). here is a sample of the HTML :

<div class="wrapper" style="width:300px; height:300px; padding:50px; border:1px solid black;">

    <div class="resizable" style="height:300px; width:150px; background:green;float:left">

        TEST TEST

    </div>


    <div class="handle" style="width:10px; height:60px; float:left; margin-top:120px; background:red;"> </div>

</div>

thank you.

Upvotes: 0

Views: 2896

Answers (2)

Mike
Mike

Reputation: 2587

jQuery('.resizable').css({
  'height': '150px'
})

If you ask nicely, more people would have answered to it by now.

Upvotes: 1

cllpse
cllpse

Reputation: 21727

Take a look at the built-in height() function:

$(function ()
{
    $(".resizable").height(300); // .resizable to 300px in height
});

Upvotes: 0

Related Questions