开发者

Removing scrollbar from iframe on ajax request

开发者 https://www.devze.com 2023-02-21 05:33 出处:网络
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

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

精彩评论

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