Hi,
I’ve reached page 13 by now, and i like this script the most.
After playing around with it for a few hours, i’m starting to understand most of it’s code.
I was wondering though, how i could get one image to zoom on a pageload event.
Would appreciate it a lot if some1 or you could help me with this problem.
Javascript is such a powerful language and i had no idea you could create such beauty with it.
Wow… cracking your brain for 2 days in a row… all my apologies about that
The Javascript “module pattern” I use is very powerfull. All variables and methods used in the script are “private” members and cannot be accessed from the outside.
You can create “public” resources in the return {} bloc. In your case, let’s add an “open” function :
return {
// ==== public bloc ====
init : init,
open : function (index) {
divs[index].click();
}
}
You will be able to call it from the outside (e.g. in an event bloc) like this:
res.open(0); // 0 for the first image, 1 for the next one, etc...
for example, this code will launch the script and open the first image:
Congratulation, dear Deumeuleu,
it´s rare, but I’m speechless;
and impressed.
Thank you for this excellent programm-design,
friendly regards from Norway
Anett
Hi,
I’ve reached page 13 by now, and i like this script the most.
After playing around with it for a few hours, i’m starting to understand most of it’s code.
I was wondering though, how i could get one image to zoom on a pageload event.
Would appreciate it a lot if some1 or you could help me with this problem.
Javascript is such a powerful language and i had no idea you could create such beauty with it.
Thanks you very much for this great site
Michiel
Could you please help me out with this ge1doot?
)
( I don’t want to beg, but this has been cracking my brains for 2 days in a row
Really like your site, can’t wait to see new stuff.
Thanks in advance.
Kind regards, Michiel.
Hi Michiel,
Wow… cracking your brain for 2 days in a row… all my apologies about that
The Javascript “module pattern” I use is very powerfull. All variables and methods used in the script are “private” members and cannot be accessed from the outside.
You can create “public” resources in the return {} bloc. In your case, let’s add an “open” function :
return { // ==== public bloc ==== init : init, open : function (index) { divs[index].click(); } }You will be able to call it from the outside (e.g. in an event bloc) like this:
for example, this code will launch the script and open the first image:
// ==== start script ==== setTimeout(function() { res.init(); res.open(0); }, 100);Hope this helps,
Gerard