开发者

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

开发者 https://www.devze.com 2023-01-10 08:21 出处:网络
is there is any way to get the width and height of a resizable div while resizing开发者_C百科 i try the following code but it resulted as undefined in alert box

is there is any way to get the width and height of a resizable div while resizing开发者_C百科 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);
     }
});


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

        var t = $(this);

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

    }
});

See:

  • http://api.jquery.com/height/
  • http://api.jquery.com/width/
0

精彩评论

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