最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Jqueryui dialog "resizeable: false" not working? - Stack Overflow

programmeradmin3浏览0评论

Below is my code. When it opens the modal, it IS resizeable even though it's set to false. This is not expected. All other parameters work as expected (height, width, position, draggable, modal).

    //MODAL IFRAME POPUP FOR EDITS/adds
    $("#modalDiv").dialog({
        modal: true,
        autoOpen: false,
        height: '400',
        width: '400',
        position: ['150','200'],
        draggable: true,
        resizeable: false,
        title: ''
    });

    //catch a click on an item with the class "add" open modal div.
    $('.add').live('click', function () {
        var thing = $(this).attr('add')
        url = 'add/' + thing + '.aspx?appid=' + $('.lblAppID').html();
        $('#modalIFrame').attr('src', url);
        $('#modalDiv').dialog('open');
        return false;
    });

However, if I call the following code from within the modal iframe, it makes it unresizeable (as expected).

window.parent.$("#modalDiv").dialog("option", "resizable", false);

This works, but preferably I'd like to know what I'm missing... I'm sure it's something stupid. Help?

Below is my code. When it opens the modal, it IS resizeable even though it's set to false. This is not expected. All other parameters work as expected (height, width, position, draggable, modal).

    //MODAL IFRAME POPUP FOR EDITS/adds
    $("#modalDiv").dialog({
        modal: true,
        autoOpen: false,
        height: '400',
        width: '400',
        position: ['150','200'],
        draggable: true,
        resizeable: false,
        title: ''
    });

    //catch a click on an item with the class "add" open modal div.
    $('.add').live('click', function () {
        var thing = $(this).attr('add')
        url = 'add/' + thing + '.aspx?appid=' + $('.lblAppID').html();
        $('#modalIFrame').attr('src', url);
        $('#modalDiv').dialog('open');
        return false;
    });

However, if I call the following code from within the modal iframe, it makes it unresizeable (as expected).

window.parent.$("#modalDiv").dialog("option", "resizable", false);

This works, but preferably I'd like to know what I'm missing... I'm sure it's something stupid. Help?

Share Improve this question asked Jun 2, 2011 at 14:56 user736893user736893 2
  • 2 That's indeed resizable, not resizeable. – Frédéric Hamidi Commented Jun 2, 2011 at 14:58
  • 1 I love that this question has 1000 views now... wonder how many people are searching for "resizeable" :) – user736893 Commented Jun 12, 2013 at 19:50
Add a ment  | 

2 Answers 2

Reset to default 10

It's resizable, not resizeable.

You're spelling the word two different ways :-)

发布评论

评论列表(0)

  1. 暂无评论