My favorites | Sign in
Project Home Downloads Issues
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions
Issue 175: create an easy quick close nyrolmodal function
2 people starred this issue and may be notified of changes. Back to list
 
Project Member Reported by william....@gmail.com, Feb 20, 2009
see issue 172 where i try to quickly pop these windows where this could be
useful

//could manually have to call these three lines each time
SOLUTION ONE
IN CODE...
jQuery.fx.off = true;
$.nyroModalRemove(); //so that if closes right away not to cause issues
jQuery.fx.off = false;//then turn effects back on
...then open next window

i do not want to turn off effect all the time, but just in this case so i
can quickly get rid of the window. the issue with this is what if something
else needs effect on right at the moment i turn it off

SOLUTION TWO
or i created a custom function to do the same thing (this reuses some code
and can be harder to maintain but could we move solution one into a method
like this )
	// Remove the modal function completely [custom suggested function, maybe
call it nyroModalQuickRemove ]
	$.nyroModalEndRemove = function() {
		if(modal.full){
			modal.ready = false;
			modal.anim = true;
			modal.closing = true;
			endRemove();
		}
	};

        USING SOLUTION ONES'S CODE
        // Remove the modal function completely
	$.nyroModalEndRemove = function() {
		jQuery.fx.off = true;
                $.nyroModalRemove(); //so that if closes right away not to
cause issues
                jQuery.fx.off = false;//then turn effects back on
	};

IN CODE...
$.nyroModalEndRemove();
...then open next window


Feb 20, 2009
Project Member #1 william....@gmail.com
to try to explain the need, lets say i have two divs, a left and right one and want
to toggle back and forth and load a nyroModal into a div on the left or right but not
have two modals up at the same time.  if i have the modal up in the left div and i
click show right div modal, i must manually close it and must wait for the left modal
to close before if can correctly load up and display in the right. i want that quicker.

just see issue 172 attached file for a better demo

Powered by Google Project Hosting