<!DOCTYPE html> <html> <head> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <script> $(document).ready(function() { $("#what").click(function() { $("div").animate( { left: '+=250px' }); }); $("#hat").click(function() { $("div").animate( { right: '+=250px' }); }); }); </script> </head> <body> <p id="what">></p> <p id="hat"><</p> <p></p> <table border="4"> <div style="background:#42ny41;height:100px;width:100px;position:absolute;"> Java is Object oriented </div> </body> </html>
#hat
div
right: '+=250px'
left: '-=250px'
#what
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)