Help porting this jQuery script to MooTools?

Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If we need to use another JavaScript library alongside jQuery, we can return control of $ back to the other library with a call to $.noConflict().

Var jq = jQuery.noConflict(); jq(document). Ready(function () { var hide = false; jq("#posts-menu, . Submenu").

Hover(function(){ if (hide) clearTimeout(hide); jq(". Submenu").fadeIn(); }, function() { hide = setTimeout(function() { jq(". Submenu").

FadeOut("slow"); }, 250); }); }); Many JavaScript libraries use $ as a function or variable name, just as jQuery does. In jQuery's case, $ is just an alias for jQuery, so all functionality is available without using $. If we need to use another JavaScript library alongside jQuery, we can return control of $ back to the other library with a call to $.noConflict(): http://api.jquery.com/jQuery.noConflict.

I'm writing this by hand, so it might need some tweaking: window. AddEvent('domready', function(){ var hide = false; $('posts-menu'). GetElement('.

Submenu'). AddEvents({ mouseenter: function() { if (hide) clearTimeout(hide); this. Fade('in'); }, mouseleave: function() { hide = setTimeout(function() { this.

Fade('out'); }, 250); } }); }); Let me know if it works or not, or otherwise host an example on jsfiddle.net, it makes it easier for us to help you. Furthermore, instead of setTimeout try the delay method: http://mootools.net/docs/core/Types/Function#Function:delay If you want more flexibility with the fade, try the tween('opacity') method instead: http://mootools.net/docs/core/Fx/Fx.Tween#Element:tween.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions