I have a jQuery function (stripped down just for this example):
(function($) {
$.fn.Lightbox = function(options) {
var opts = $.extend(defaults, options);
function initialize() {
$('#lightbox').show();
return false;
};
function close() {
$('#lightbox').hide();
};
return this.click(initialize);
};
})(jQuery);
I then use....
$('a.image').Lightbox();
to run it. I want to be able to call the close() function seperately e.g.
$.Lightbox.close();
How can I achieve this within my code?