jQuery Resizable handles setter not working

后端 未结 1 1250
盖世英雄少女心
盖世英雄少女心 2021-01-23 22:59

i\'m using jQuery UI Resizable, and i need to set handles option after the initialization.

I followed the API example and initialization method works just fine, but set

相关标签:
1条回答
  • 2021-01-23 23:54

    It's a known bug:

    http://bugs.jqueryui.com/ticket/3423

    Workaround from the issue:

    A dirty solution is to enable all the handlers that you are going to need on init.

    Add a class like the following in CSS

    .ui-hide-handler { width:0 !important; height:0 !important; }

    and add/remove the class to the handler DIVs according to your needs

    $('.ui-icon-gripsmall-diagonal-se', element).addClass('ui-hide-handler'); $('.ui-resizable-sw', element).addClass('ui-hide-handler');

    As I said, it's dirty solution but it works.

    0 讨论(0)
提交回复
热议问题