jquery boxy plugin: prevent multiple instances of the same dialog when clicking the link multiple ti
Posted
by Lyon
on Stack Overflow
See other posts from Stack Overflow
or by Lyon
Published on 2010-04-14T15:19:07Z
Indexed on
2010/04/14
15:23 UTC
Read the original article
Hit count: 582
jQuery
|jquery-plugins
Hi,
I'm using the Boxy jQuery plugin to open dialog windows and populating it through ajax. http://onehackoranother.com/projects/jquery/boxy/
Here's my code so far:
$("a.create").click(function (e) {
url = $(e.target).attr('href');
Boxy.load(url, {title:'Test'});
});
This opens up a dialog alright. However, if I click the link again, another dialog will open. How can I make it such that the previously opened Boxy dialog will come into focus? I only want one instance of this dialog.
I tried assigning a variable to var ele = Boxy.load();
but the variable ele
returns undefined...
Alas, I can't make out much from the limited Boxy documentation available.
Enabling the option modal: true
would prevent the user from clicking on the link multiple times, but I don't want the overlay to show.
Thanks for any light you can shed on this.
-Lyon
© Stack Overflow or respective owner