jQuery to Mootools

Discussion in 'jQuery' started by jonhyhar, Jan 9, 2010.

  1. #1
    Hey guys, how can i change the js jquery code below to a mootools js code? I will really appreciate your help, as i really need it
    I'm awaiting your reply, thank you

    The page: http://www.meytan.com/postsend.html

    
    <script type="text/javascript"> 
    
    $(document).ready(function(){
    	$('form').submit( postsend )
    });
    	
    function postsend (){
    $("#result").html('<div id=img><center><img src="http://b.static.ak.fbcdn.net/rsrc.php/zBS5C/hash/7hwy7at6.gif"></center></div>');
    $('#result').slideDown('slow');
    
    jQuery.ajax({
    type:'POST',
    url:'postal.php',
    data:$('#form1').serialize(),
    success:function(answer){
        $("#result").html(answer);
    setTimeout('$(\'#result\').hide()',4000);
    }
    });
    }
    
    function hide1()
    {
    $("#form1").hide('slow');
    }
    
    </script>
    
    Code (markup):

     
    jonhyhar, Jan 9, 2010 IP
  2. dimitar christoff

    dimitar christoff Active Member

    Messages:
    882
    Likes Received:
    62
    Best Answers:
    0
    Trophy Points:
    90
    #2
    this will get you started - http://www.jsfiddle.net/vFrUH/

    good luck - i dont know what the slideDown("slow") does in jquery but if its a height transition, use $("result").set("tween", {duration: "slow"}).start("height", 20); or something similar to shrink it.
     
    dimitar christoff, Jan 10, 2010 IP
  3. jonhyhar

    jonhyhar Active Member

    Messages:
    166
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #3
    thank you very much dimitar christoff :)
     
    jonhyhar, Jan 10, 2010 IP