/    Sign up×
Community /Pin to ProfileBookmark

[RESOLVED] Help using 2 effect together…

Hi all,
Im a newbe in javascript, mootools, jquery ecc…so sorry if the questions are silly or stupid…

Im trying to put two effect at the same time, one is a scroll effect from mootools, the second one its another kind of scroll from jquery.

one esclude the other so I thought that maybe the jquery function could be translated/adapted into mootools function.

here’s my jquery code:

var name = “#top”;
var menuYloc = null;

$(document).ready(function(){
menuYloc = parseInt($(name).css(“top”).substring(0,$(name).css(“top”).indexOf(“px”)))
$(window).scroll(function () {
offset = menuYloc+$(document).scrollTop()+”px”;
$(name).animate( {top:offset},{duration:500,queue:false});
});
});

is it possible to adapt it for mootools?

thanks for your help in advance.

Maurizio ?

to post a comment
JavaScript

2 Comments(s)

×

Success!

Help @mauriziol spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...