Issue 67: Help with callbacks
Status:  Fixed
Owner: ----
Closed:  Aug 2008
Reported by slogen...@gmail.com, Aug 18, 2008
I'm having an issue with using callbacks with nyroModal. I'm pretty new to
javascript, so if you could please tell me what i'm doing wrong, it would
be greatly appreciated. Thanks. My code is below.

$(document).ready(function() {
		
		$("a.window").nyroModal({
				width: 600,
				endRemove: reboot()
			});
	});
	function reboot() {
		alert('hello');
	};

I want to trigger a function after the window closes, but instead it is
initiating immediately after the document loads.
 
Aug 18, 2008
#1 slogen...@gmail.com
Nevermind, after some more searching I found the solution. Thanks
Aug 26, 2008
Project Member #2 nyro...@gmail.com
for the record, here is how I will write your code:
$(function() {
	$("a.window").nyroModal({
		width: 600,
		endRemove: reboot
	});
});
function reboot() {
	alert('hello');
};
Status: Fixed
Labels: -Type-Defect Type-Other