Keep a jQuery dialog in a div

前端 未结 2 831
遇见更好的自我
遇见更好的自我 2021-01-19 13:59

I am trying to create a number of jQuery dialogs but I would like to constrain their positions to inside a parent div. I am using the following code to create them (on a sid

2条回答
  •  暖寄归人
    2021-01-19 14:14

    I have found a way to do it. This is now my method for creating a dialog:

        var d = $('
    ').dialog({ autoOpen: true, closeOnEscape: false, resizable: false, width: 100, height: 100 }); d.parent().find('a').find('span').attr('class', 'ui-icon ui-icon-minus'); d.parent().draggable({ containment: '#controlContent', opacity: 0.70 }); $('#controlContent').append(d.parent());

提交回复
热议问题