Go Back   CodingForums.com > :: Client side development > JavaScript programming > JavaScript frameworks

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-16-2008, 11:55 PM   PM User | #1
Mauriziol
New to the CF scene

 
Join Date: Jul 2008
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Mauriziol is an unknown quantity at this point
help translating the code

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 :)
Mauriziol is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 03:46 AM.


Advertisement
Log in to turn off these ads.