Sublime Text
<!DOCTYPE html> <html> <head> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.0.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("div").animate({left:'300px'}); $("div").animate({top:'300px'}); $("div").animate({left:'0px'}); $("div").animate({top:'0px'}); }) }) </script> <style type="text/css"> div{ width:50px; height:50px; background:brown; position:relative; } </style> </head> <body> <p><button>Click here</button></p> <div></div> </body> </html>
<!DOCTYPE html> <html> <head> <script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.12.0.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $("div").animate({left:'300px'}); $("div").animate({top:'300px'}); $("div").animate({left:'0px'}); $("div").animate({top:'0px'}); }) }) </script> <style type="text/css"> div{ width:50px; height:50px; background:brown; position:relative; } </style> </head> <body> <p><button>Click here</button></p> <div></div> </body> </html>