onClose

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

onClose

Nicholas Leeson
Hello,

I'm trying to figure out this onClose option. Currently I have a FancyBox with some text/links in it, and when I click on one of the links, the fancybox closes and a shadowbox opens with a specific pdf document to view. What I want to do now is have my fancybox with text/links re-open when I close my shadowbox. Does anyone have an example of using the onClose feature?

Thanks,
Nick
Reply | Threaded
Open this post in threaded view
|

Re: onClose

HenzeBerkheij
onclose: function(){
     //do something in here
}
El
Reply | Threaded
Open this post in threaded view
|

Re: onClose

El
Thank you for responding here, Henze.  When I try to call a simple javascript alert using your method, nothing happens:

        onClose : function () {
                alert("This works!")
                                        },

doesn't work.  I'm using the wordpress plugin and altered the options section in the core.js (defaulted on onClose=noop,) to the code above, and it simply doesn't seem to do anything.

Am I missing something?  I also tried the same code for onFinish, onOpen...still nothing.  It just seems to be ignoring anything I do.

Example can be see here:http://everybodycanlove.com/test/

Regards
Reply | Threaded
Open this post in threaded view
|

Re: onClose

Thea Ganoe
I dropped your function into my init() function and it worked just fine.

Shadowbox.init({
        handleOversize: "drag",
        //onClose:function(){ personObj.lastname="new guy"; }
        onClose : function () {
                alert("This works!")
                                        }
});