fancybox - passing 'this' to onClosed function

Posted by Phil Jackson on Stack Overflow See other posts from Stack Overflow or by Phil Jackson
Published on 2011-02-11T07:22:53Z Indexed on 2011/02/11 7:25 UTC
Read the original article Hit count: 131

Filed under:
|
|

Hi this is probly really simple but I juast cant seem to figure it out!

if( is_logged_out( html ) ) {
    var throughClick = $(this);
    $.fancybox( html, { 
        'autoDimensions' : false,
        'width' : 'auto', 
        'height' : 'auto', 
        'transitionIn' : 'none', 
        'transitionOut' : 'none',
        'hideOnOverlayClick' : false, 
        'showCloseButton' : false, 
        'onClosed' : 
        function( throughClick ) {
            alert(throughClick.attr('name'));
            throughClick.trigger('click');      
        }
    });
}else{

All i want to do is pass the object of whichever button or link that was clicked, so once the user has logged back in it will process again.

Any help is much appreciated.

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about function