Beauty In Design Community
Welcome, Guest
Please Login or Register.
Lost Password?

Welcome to Our New Forum

Welcome to our new forum powered by BestofJoomla.com's "FireBoard".  Please note that we have lost alot of posts recently due to some compatibility issues.  This forum continues to be for registered users only but the public now has access to view posts!

Re:Trouble implementing mootools (1 viewing)
_GEN_GOTOBOTTOM Post Reply

TOPIC: Re:Trouble implementing mootools

#117
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Trouble implementing mootools 2007/05/23 04:32  
I am having trouble making mootools scripts work. I have copied the html, css and scripts for numerous examples, and referenced mootools source, but I cannot get the thing to produce the desired results. I fully admit I am a javascript novice, but have made other scripts work previously.

On one of their external links, I tried to create the sample nav bar , using the following code in dreamweaver, but no love. Can you help me? Thanks. I have attached the version of mootools I am using
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" version="-//W3C//DTD XHTML 1.1//EN" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=windows-1250">
<meta name="generator" content="PSPad editor, www.pspad.com">
<title></title>
<script type="text/javascript" src="mootools.js"></script>
<script type="text/javascript">
var effects = new Array();
window.onload=function(){
var els = document.getElementsByClassName('cool');
for (var i=0; i<els.length; i++){
els[i].id='cool'+i;
effects[els[i].id]=els[i].effect('font-size', {duration: 400, transition: fx.expoOut});
els[i].addEvent('mouseover', function(){effects[this.id].emphasize()});
els[i].addEvent('mouseout', function(){effects[this.id].deemphasize()});
}
};
fx.Style.implement({
emphasize: function(){
this.clearTimer();
this.custom(parseInt(this.el.getStyle('font-size')), 24);
},
deemphasize: function(){
this.clearTimer();
this.custom(parseInt(this.el.getStyle('font-size')), 12);
}
});
</script>

<style>
.cool {
padding:12px;
line-height:48px;
background:#f8f8f8;
font-size:12px;
margin:auto;
vertical-align:middle;
color:#666;
text-decoration:none;
}
.cool:hover {
color:#000;
background:none;
}
#nav {
text-align:center;
}
h1 {
text-align:center;
}
</style>
</head>
<body>
<h1>Sample Nav Bar</h1>
<div id="nav">
<a href="#" class="cool">Link</a><a href="#" class="cool">Link 2</a><a href="#" class="cool">Link 3</a>

</div>
</body>
</html>
  The administrator has disabled public write access.
#118
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/23 05:52  
I actually couldn't attach the mootools v1.1 core file here, but I basically used a file that included all mootools modules that are up there.
  The administrator has disabled public write access.
#119
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/23 09:16  
never mind, I figured out my problem
  The administrator has disabled public write access.
#120
Rick (Admin)
Admin
Posts: 48
graph
Re:Trouble implementing mootools 2007/05/23 15:26  
Peter,
Can you share your solution (for other users)?
The Attractive Media Experience,
beautyindesign.com
  The administrator has disabled public write access.
#121
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/24 06:20  
Not sure if I am actually all solved on this. The example posted above didn't actually work, but some other mootools examples worked for me. So it is a step in the right direction. I moved some scripts from the head to the body, and things worked, but not in all cases. It seems like the scripts should work whether I have them in the body or head, but I may be wrong. This isn't much of a solution to the question posted above. When I get to the bottom if it, I'll be happy to share.
  The administrator has disabled public write access.
#122
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/24 10:44  
very frustrating. I copy the code exactly as in the mootools forthe rest of us tutorial, and can't get it to work. I can get some of the demos from the mootools site to work (fx.Styles, fx.Slider, etc), but when I go to try the rick hopkins drag demo, can't make it go. I have racked my brain trying to figure out what I am doing wrong, but can't seem to find a rhyme or reason to why one code that I copy works, and another doesn't.
  The administrator has disabled public write access.
#123
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/24 21:04  
sorry to bump on this. Last one here. I am using mootools v1.1. Is that what you were using for your demo? I am assuming you may be using an older version. When I use the demos on the mootools site, they work, but several externally referenced mootools demos don't seem to work for me, including the drag and resize example from rick hopkins site. This may be the problem.
  The administrator has disabled public write access.
#124
Rick (Admin)
Admin
Posts: 48
graph
Re:Trouble implementing mootools 2007/05/24 22:13  
Unfortunatly, the demo of the JoomlaOS is using an old version of MooTools. If you download the template you can get/use the older version and those scripts will be compatible. We don't have an updated version of the JoomlaOS as of yet either.
The Attractive Media Experience,
beautyindesign.com
  The administrator has disabled public write access.
#126
Peter Schwartz (User)
Junior Boarder
Posts: 7
graphgraph
Re:Trouble implementing mootools 2007/05/26 21:55  
After trying a bunch of different mootools scripts, I found that the different versions of mootools are not the same (or necessarily compatible with scripts created in different versions). You pretty much need to use the version that the effect was created on. I usually go and cut and paste the javascript source from the page, and things work.
  The administrator has disabled public write access.
_GEN_GOTOTOP Post Reply
© Copyright 2007 Best of Joomla, Powered by FireBoardget the latest posts directly to your desktop
Contact Information