[jQuery] The Perfect Pop-up as a jQuery plugin?
I'm looking for some help with scoping variables used to store
references to popped-up windows.
What I have so far:
http://static.fusion.com.au/ollie/jquery/popwindow2/
is a dumbed down version of:
http://jquery.com/plugins/project/PopupWindow
I would like to incorporate some of the accessibility considerations
of:
http://www.accessify.com/features/tutorials/the-perfect-popup/
In particular the ability to close and reopen pop-ups that are already
open to ensure the pop-up is focussed. Attempting to store a reference
to the pop opened windows has had me all tangled up in the scoping of
the jquery plugin structure. This is where I'm struggling.
Where should I be storing the window reference variable so that it
remains accessible to subsequent clicks? Is it possible to create
these references dynamically - when the pop-up links are clicked?
###
What I envisaged was storing a variable for each pop window profile.
That is - popping another window will close any previously popped
window that used the same profile. In contrast popping another window
with a different profile to an already open pop window will not close
the former.
Feeling a little out of my depth...
Ollie