View Full Version : Can some one explain to me how this script works?
JAVAEOC
01-17-2004, 10:41 PM
hers the script:
http://www.javascript-fx.com/navigation/imagefader/demo5.html
here you can download all hte files:
http://www.javascript-fx.com/navigation/imagefader/download.html
so if anyone knows how and why this script works, please teach me
thanks for any help
scroots
01-17-2004, 11:00 PM
it can sometimes be best in these cases to ask the author.
scroots
Garadon
01-17-2004, 11:34 PM
it hooks onto the document mouse over/out events,
these are fired when ever the mouse move over an element.
then that element is send to the function hooked, that function then checks if the current element had the rigth classname if so it start an automate fade in/out dependent on if it was mouse in/pot event, the automated fade include a timeout so u actually have time to see the fade.
JAVAEOC
01-18-2004, 01:35 AM
thanks for explaining to me what it does, but how does it work?
A1ien51
01-18-2004, 03:11 AM
The best way to do this is to rip the code apart and figure it out for yourself...
JAVAEOC
01-18-2004, 04:16 AM
thanks for THAT tip but i have been triing to do that for over 4 weeks now so i decided to post this question.
mordred
01-18-2004, 09:25 AM
Well, what kind of answer do you expect them? In my opinion, Garadon gave you a nice overview *how* this script works. Was it too general or what exactly?
JAVAEOC
01-18-2004, 02:00 PM
NO, i wanted to know how the script works, which functions make what happen, stuff like that.
I am sorry if i havent said that clear enough
glenngv
01-19-2004, 08:41 AM
The external js JSFX_ImageFader.js contains documentation of the each function.
/*******************************************************************
*
* Function : actionOnMouseOver
*
* Description : Called automatically whenever an element in the
* document is "mousedOver". It checks to see if the
* element has the className == "imageFader" and if so
* starts fading up the element.
*
*****************************************************************/
JSFX.fadeImage_actionOnMouseOver = function(e)
{
...
What else do you want to know?
JAVAEOC
01-19-2004, 02:30 PM
Well I am stupid and cant use these coments, they tell me what he is about to do but not how, that is why i chose to seek help in this forum.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.