jnunemaker/fancy-zoom — Issue #12: Sample code for a callback function...
Author: overtune
Created: 2011-10-25 08:20:07+00:00
State: open

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 (beneat "var directory = options && options.directory ? options.directory : 'images';"). Add the following code:

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

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

callback();

Thats all, hope this helps someone.