You will recieve your password to this address. Address is not made public.

Your preferred username that is used when logging in.

Two callback functions for different events. Created Mar 22, 2010

This thread is solved

Views: 587     Replies: 2     Last reply Mar 29, 2010  
You must login first before you can use this feature

kurai

Posts: 2

Registered:
Mar 22, 2010

Two callback functions for different events.

Posted: Mar 22, 2010

Hi!
I need to have two different Callback functions for two overlay events. Long story short, I need to start a timer on load and to stop it on closing the overlay.

So I did this:
	$("img[rel]").overlay({ 
		
		onLoad: function(event)  {
			$(".achievementoverlay").overlay().load();
			startTimer();
		}
		
		onClose: function(event) {
			stopTimer();
		}

But it destroys the entire overlay (the overlay doesn't open). Where am I wrong? Thanks!

kurai

Posts: 2

Registered:
Mar 22, 2010

» Two callback functions for different events.

Posted: Mar 28, 2010

Reply to: Two callback functions for different events., from kurai
Uhm... noone can help?

gmcfarlane

Posts: 2

Registered:
Mar 9, 2010

» Two callback functions for different events.

Posted: Mar 29, 2010

Reply to: Two callback functions for different events., from kurai
kurai

im new at this myself, i am doing it a little different
but here is what works for me

var exposeOptions = {
color: '#000000',
loadSpeed: 1200,
opacity: 0.65,
onLoad: startTimer,
onClose: stopTimer
}

overlayForModal = $("#triggerElem").overlay(
{
target: '#modalDiv',
expose: exposeOptions,
closeOnClick: false,
api:true
}
);

overlayForModal.load();

this is working for me.
In the first stmt i set up the trigger, returning the api
in the second i call the load().