Reputation: 36970
I would like to launch fancybox from another function. I need this trigger after some ajax function get success.
Code Base
$.post('principals/search_post/'+value, function(data) {
**// I need to call fancybox here**
});
EDIT
I have a url like http://example.com/somepage. I need to open this in an iframe with fancybox after that ajax function.
Upvotes: 0
Views: 2221
Reputation: 8769
You can open fancybox manually:
$.fancybox.open({
href: 'your_url',
type: 'iframe'
});
Upvotes: 6
Reputation: 7757
do you mean
$.post('principals/search_post/'+value, function(data) {
$("a.images").fancybox();
});
Upvotes: 0