how to get the current picture in a callback function

203 views
Skip to first unread message

fcat...@googlemail.com

unread,
Mar 24, 2009, 5:37:10 PM3/24/09
to fancybox
Hi there I need to get the current item in my callbackfunction:

$("a.fancybox").fancybox({
'callbackOnShow': function() {
// Here I want to get the a or img that has been clicked
}
});


Any ideas?

alberto marlboro

unread,
May 1, 2009, 8:42:10 PM5/1/09
to fancybox
I have the same issue, I wanna click on image (in a iframed/fancybox)
and close that iframe and fill an input with image location.



On 24 mar, 18:37, "fcat1...@googlemail.com" <fcat1...@googlemail.com>
wrote:

Paamayim

unread,
Jun 8, 2009, 8:24:44 PM6/8/09
to fancybox
Me too, otherwise the callbacks lack functionality without a reference
to the relevant html id.

Thank you.

srjuanjo

unread,
Jun 24, 2009, 7:02:17 AM6/24/09
to fancybox
Here is the solution ;-)

$("a.mipopupp").fancybox({
'zoomSpeedIn':300,
'zoomSpeedOut':300,
'hideOnContentClick':false,
'frameWidth':700,
'frameHeight':400,
'callbackOnClose':function(){
$('#parent_id').val($("#fancy_frame").contents().find
("#children_id").val());
}

});

<a class="mipopupp" href="popupFancybox.html?iframe"><img
src="imageButton.jpg" /></a>
---------------------

-parent_id location is in the parent page

-children_id location is in the popup fancybox layer

- the value of children_id goes to parent_id
Reply all
Reply to author
Forward
0 new messages