homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
Forum Library, Charter, Moderator: open

JavaScript and AJAX Forum

Converting mootool to jquery

Msg#: 4199885 posted 8:34 am on Sep 10, 2010 (gmt 0)

Does anyone know how if there is a converter to do this?

I need to convert the code as mootool and jquery don't seem to want to work together on my page.

Any help will be appreciated.



Msg#: 4199885 posted 8:40 am on Sep 10, 2010 (gmt 0)

Nearly forgot: this is the code

var isExtended = 0;
var height = 165;
var width = 240;
var slideDuration = 1000;
var opacityDuration = 1500;

function extendContract(){
if(isExtended == 0){
sideBarSlide(0, height, 0, width);
sideBarOpacity(0, 1);
isExtended = 1;
sideBarSlide(height, 0, width, 0);
sideBarOpacity(1, 0);
isExtended = 0;
function sideBarSlide(fromHeight, toHeight, fromWidth, toWidth){
var myEffects = new Fx.Styles('sideBarContents', {duration: slideDuration, transition: Fx.Transitions.linear});
'height': [fromHeight, toHeight],
'width': [fromWidth, toWidth]
function sideBarOpacity(from, to){
var myEffects = new Fx.Styles('sideBarContents', {duration: opacityDuration, transition: Fx.Transitions.linear});
'opacity': [from, to]
function init(){
$('sideBarTab').addEvent('click', function(){extendContract()});
isExtended = 1;
window.addEvent('load', function(){init()});


Msg#: 4199885 posted 9:53 am on Sep 15, 2010 (gmt 0)

After my system malfunctioned last night and I lost the full working copy of my project I set to redo all the work I have done in the last 7 days. Bummer!

I'm posting this in case anyone happens upon my post looking for a solution to the same problem I had. It's all about learning and teaching.

So as I was not able to work my head around converting mootools I set it aside and went out looking for another option.

function showHide(obj) {
var div = document.getElementById(obj);
if (div.style.display == 'none') {
div.style.display = '';
else {
div.style.display = 'none';

<a class="#*$!" href="#" onclick="showHide('hidden');"></a>

And now my box open and closes on demand, the script is lighter and I have gotten rid of my mootool headache.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / JavaScript and AJAX
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved