Calling Fancybox from within .click()
Hi I have seen example code that makes no sense to me. On this stack Question at Fancybox - form submit and close it? the user has posted this code:
$('a.detail').click(function() {
$.fancybox({
'width' : 750,
'height' : 520,
'title' : 'EDIÇÃO DE SHOW',
'titlePosition' : 'inside',
'transitionIn' : 'fade',
'transitionOut' : 'none',
'href' : 'templates/detail.php?id=<?php echo $tg_id['id'];?>',
'type' : 'iframe'
})
})
but fancybox doesn't seem to behave this way. The fancybox call seems to only load the trigger onto the link, not actually display it. I would really like to know how to do it this way without having to wrap a hidden link into the page and trigger it that way. Th开发者_运维知识库is seems alot cleaner.
if are using zend and php then create and separate action and view to load the content or site u want to display . and disable the layout ..
What about calling fancybox directly like that:
$.fancybox(things_to_be_displayed, {settings});
You can use this call in any event handler. Check the manual call examples on fancybox webpage.
精彩评论