开发者

Removing scrollbar from iframe on ajax request

In my iframe src page I am increasing the w开发者_运维百科idth and height of div on button click without submitting the page . When the size of div increases there is vertical and horizontal scrollbar coming inside the iframe. Is it possible to have browser scrollbar in place of iframe scrollbar when size of div increases inside iframe source page

Regards, Amit

<div id='content'>Test </div>  <button id="submit">Submit</button>




$('#submit').click(function(){

    $('#content').css('height','1400px');
        $('#content').css('width','1800px');
    });


});


Add a defined height overflow:hidden to the wrapping element.


If you're already using jQuery, you can try: http://plugins.jquery.com/project/jquery-iframe-resizer

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜