Question

Using $.nmManual instead of the default .nyroModal . The default nyroModel will resize the model automatically based on the browser window size, but the filters are vague at best when trying to set this.

$('.nyroModal').nyroModal(); Default function works fine.

$.nmManual('test.html', {
                        modal: true,              //doesn't seem to do anything  
                               sizes: {
                                      minW: 805,   //this works
                                      minH: 610,
                                      },
                        showCloseButton: false,   //also works
                        anim: { 
                           resize: true,          //both these do nothing
                           showTrans:true,
                        }

I nyromodel site makes it quite hard to understand exactly what parameters the resize, def, and showtrans actually use.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top