Reputation:
I defined my overlay for like that
$j('#heise').prepOverlay(
{
subtype: 'ajax',
noform: function(el) {return noformerrorshow(el, 'close');}
}
(which is working perfectly fine).
Now I need to trigger the overlay manually.
The user enters some data into so form and upon form submission the result should be displayed inside the overflow. Modifying the 'href' value with the form parameters is no problem however I don't know how to trigger the appearance of the overlay manually through Javascript. I found the low-level overlay() API method of jqueryTools but it's not helpful here. Any idea?
Upvotes: 0
Views: 872
Reputation: 1125048
The normal way to open a jQueryTools overlay is through .load()
on the overlay API, but .prepOverlay hides all that in it's own wrapper in place for ajax
style overlays. You can do one of two things:
Call the click handler:
jQuery('#heise').click();
This will trigger the correct handlers for all click events.
Call the pb.ajax_click
handler directly, binding this
to your element:
pb.ajax_click.apply(jQuery('#heise'));
This only will trigger the ajax
click handler.
Upvotes: 1