开发者

HTML5 drag height on window resize

i have this bit of code: var dragHeight = window.innerHeight - parseInt(jQuery("#drag_area").css("margin-top")) - 5; to set the drag height for each browser size. but say i start the browser not maximized and then maximize it, the drag height is still开发者_C百科 the same as previous and wont let me drag all the way to the bottom of screen, any help would be appreciated. thanks


It could be something like this...

var dragHeight,
    calcDragHeight = function() {
        dragHeight = window.innerHeight - parseInt($("#drag_area").css("margin-top")) - 5;
    };

calcDragHeight();

$(function() {
    $(window).resize(function() {calcDragHeight();});
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜