Convert MooTools to jQuery

Discussion in 'jQuery' started by Nick252, May 22, 2009.

  1. #1
    I wan't to convert this code to work with jquery , anyone know how to do it ?

    Thanks



    window.addEvent('domready', function(){
    var examples = $$('.exampleSite');
    examples.each(function(element) {

    var fx = new Fx.Styles(element, {duration:200, wait:false});

    element.addEvent('mouseenter', function(){
    fx.start({
    'background-color': '#f4f4f4',
    'border-top-color': '#cccccc',
    'border-bottom-color': '#cccccc',
    'border-left-color': '#cccccc',
    'border-right-color': '#cccccc',
    'color': '#cc3333',
    });
    });

    element.addEvent('mouseleave', function(){
    fx.start({
    'background-color': '#ffffff',
    'border-top-color': '#ffffff',
    'border-left-color': '#ffffff',
    'border-right-color': '#ffffff',
    'border-bottom-color': '#cfcfcf',
    'color':'#666666',
    });
    });

    });
    });
     
    Nick252, May 22, 2009 IP
  2. xnz

    xnz Peon

    Messages:
    55
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I don't think it's possible, you'd have to compress/expand it A LOT!! and that would take too much time :p
     
    xnz, May 22, 2009 IP
  3. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #3
    most is easy but you've chosen to convert the Fx styles class, and thats HUGE and won't be a part of native jquery -> meaning you'd have to find a plugin for it.
    also, insofar as mootools scripts go, this is not written all that well anyway.
     
    dimitar christoff, May 23, 2009 IP