I\'m a jQuery newbie and have rigged Simple Modal to allow me to have more than one modal on a page by doing this in my script:
$(\'input.basic, a.basic\').click(f
When you hide the dialog, jQuery changes the position of the div in the DOM, then wanting to locate it with "$(this).next(...)
", you can not do. You should have some ID or a reference to locate otherwise.
EDIT: Well, you have me thinking a little echo. I hope it is useful the code that I'm going through. I'm not tested:
$('input.basic, a.basic').click(function (e)
{
e.preventDefault();
var el = "";
if($(this).data("xid")!=undefined)
{
el = $($(this).data("xid"));
}
else
{
var xid = "xid_" + ((new Date()).getTime());
el = $(this).next('.basicModalContent');
$(this).data("xid", xid);
if (el.lenght>0)
el.attr("id", xid);
}
if (el.lenght>0)
{
el.modal();
}
});