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 06-13-2008, 01:47 PM   PM User | #1
DeKraan
New to the CF scene

 
Join Date: Mar 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
DeKraan is an unknown quantity at this point
[mootools] combining two effects?

Hello everybody!

I have a problem that you might not want to fix. I hope I can help you decide by telling you what it is, and what I want with it. I'll give it a try. Because I'm not even a half-decent coder I just can't work it out. I'm trying to do the following:

I've got fx.scroll from a very, very fascinating site: http://www.melissahie.com. Ofcourse I have no intention of simply copying what she has so elegantly done, but I do want the same beautiful effect. I can't get the mootools original fx.scroll to work (http://demos111.mootools.net/Fx.Scroll) so I am currently using this one. Getting it to work was no real problem, as it works perfectly.

But now, I also want to add an accordion-effect (http://demos.mootools.net/Accordion) to a portion of a page, where I am also using the fx.scroll. The problem is, that it doesn't work. I can get both effects working, but not in a single document. Seperate from each other, they work good!

The problem has to be that I've got melissa's mootools.r420.js and I've got mootools.js that came with the accordion download. But what to do next?

I realise I cannot simply paste one into the other, and refering to both doesn't seem to work.

I've also tried to download the complete mootools.js and using that for both, but that I only thought that this would work, will tell you a lot about my skill.

Does anyone know how I can resolve this?
DeKraan is offline   Reply With Quote
Old 06-26-2008, 03:38 AM   PM User | #2
emehrkay
Regular Coder

 
Join Date: May 2005
Posts: 190
Thanks: 1
Thanked 2 Times in 2 Posts
emehrkay is an unknown quantity at this point
You only need one version of MooTools, get the full latest from the site and use that one only.

The scroll effect is a simple one liner:

//taken from the example site's html
//define the scroll[skroll] element, which is the window
var skroll = new Fx.Scroll(window, {duration: 1500, wait: false, transition: Fx.Transitions.quadInOut});

//create the scroll actions
$('gotohome').addEvent('click', function(){ skroll.toElement('start'); });

Where gotohome and start are elements with those ids.

Clashing version of MooTools is most likey your problem. That or clashing ids.

Sidequestion - do you want to add the scroll effect to an accordion "page"?
emehrkay 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 08:56 AM.


Advertisement
Log in to turn off these ads.