443 posts
  • Has been part of the Envato Community for over 4 years
  • Has sold $1,000+ on Envato Market
  • Has collected 10+ items on Envato Market
  • Sells items exclusively on Envato Market
+1 more
SplitV says
I enjoyed the article. There is something that I lack understanding of in the Javascript. Could you point out what is the mechanical or programmatic connection when the pointer is moved off the links? I was expecting to see a function name like onHoverOff, or something of that nature. I don’t see how the script know what function to execute when the cursor moves off the links. Thanks!
In Javascript it is onmouseout . In jQuery, it is the the second argument in click. Example:
$('#something').click(function () {
// onmouseover
}, /* second argument!! */ function () {
// onmouseout
});
So, is this an example of the dreaded call back function?
No, a callback function is usually a function that is run after completion of code, where as this is just and argument to the method ‘click’.
Actually Yes it is a callback, a callback is simply a reference to code to execute at a later time passed as an argument. Anytime you pass in a reference to a function as an argument to another it is a callback function(this is not limited to javascript btw)
1 post
  • Has been part of the Envato Community for over 5 years
  • Has collected 1+ items on Envato Market
  • Located in Greece
alexteq says

hey alec

great post i really liked no.4 keep animation from building up

i thought that was only possible using stop() but i didnt really like it so i kept searching and found your post

i like the queue:false approach better i think its closer to the jquery way of doing things

you may want to check out my site http://alex-web.gr

alex

by
by
by
by
by
by