user407283
user407283

Reputation:

is there is any way to get the width and height of a resizable div

is there is any way to get the width and height of a resizable div while resizing i try the following code but it resulted as undefined in alert box i am using jQuery resizable

$("#msc_div").resizable({
     start: function() {
        var offset = $(this).offset();
        alert(offset.height);
        alert(offset.width);
     }
});

Upvotes: 2

Views: 183

Answers (1)

James
James

Reputation: 111930

$("#msc_div").resizable({
    start: function() {

        var t = $(this);

        alert( t.height() );
        alert( t.width() );

    }
});

See:

Upvotes: 7

Related Questions