Jquery UI resizable - resize a div placed over an iframe

前端 未结 3 1650
我在风中等你
我在风中等你 2021-02-09 04:55

If you check out this jsbin: http://jsbin.com/efosed/5/edit and you press \"Run with JS\", there will be a div that can be resized with jquery ui. Everything works like expected

3条回答
  •  温柔的废话
    2021-02-09 05:33

    You can do it even simpler:

    Javascript

    $(function() {
      $('#resizable').resizable({
          start: function(event, ui) {
            $(this).addClass('freeze')
          },
        stop: function(event, ui) {
            $(this).removeClass('freeze')
          }
      });
    }); 
    

    CSS

    #resizable.freeze iframe { pointer-events: none; }
    

提交回复
热议问题