Skip to content
This repository has been archived by the owner on Feb 7, 2018. It is now read-only.

Sample code for a callback function... #12

Open
overtune opened this issue Oct 25, 2011 · 0 comments
Open

Sample code for a callback function... #12

overtune opened this issue Oct 25, 2011 · 0 comments

Comments

@overtune
Copy link

Hello!

I really like fancyzoom, it's clean and nice.
For a project I needed a callback-function when the zoom completed.
I fixed this callback function with some lines of code.
I'm all new to this with github so I really don't know how (or if) I should contrib this code to the project..

Anyway, if someone needs a callback, just do this:

On line 6 (beneath "var directory = options && options.directory ? options.directory : 'images';"). Add the following code:

var callback = options && options.callback ? options.callback : function(){};

And on line 120 (beneath "zoom_content.html(content_div.html());") add this:

callback();

Thats all, hope this helps someone.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant