nyroModel does not auto resize

别说谁变了你拦得住时间么 提交于 2019-12-03 17:29:16
macgyver

I have some answers about using the plugin in manual mode through $.nmManual. Basically you have to init filters with a code like this:

$.nmManual('http://mypage.html/', {
    callbacks: { 
      initFilters: function(nm) {
      nm.filters.push('somefilter');
      nm.filters.push('anotherfilter');
    }
  }
});

To open manually a page just you need $.nmManual('mypage.html'); if I remember right it will load the link filter, but if you want open manually a page inside an iframe you need both link and iframe filter: Open iframe manually in nyroModal?

About resizing of a loaded page, time ago I was dealing with but I have no results... using this code:

$(window).resize(function() {
    if($.nmTop() !== undefined)
    {
        $.nmTop().resize(true);
    }
});

we can force resizing but in this case it works very bad, with a delay step as you can see playing with the window... I had no more time to rewrite resize function...

I don't know if this behaviour is the same with using a DOM selector.

Finally the option modal: true prevents closing of the popup window when you click outside its edge, that is in the dark background.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!