Skip to content

Instantly share code, notes, and snippets.

@BMU-Verlag
Created July 8, 2020 15:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BMU-Verlag/06ef68eefdc5a4db8879a8b8f35dd3b6 to your computer and use it in GitHub Desktop.
Save BMU-Verlag/06ef68eefdc5a4db8879a8b8f35dd3b6 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<title>Anwendungsbeispiel jQuery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("div").animate({left: '100px', top: '350px'});
});
});
</script>
</head>
<body>
<h1>Beispiel für die Animation mit jQuery</h1>
<button>Animation starten</button>
<div style="background: #ff0033; height: 100px; width: 100px; position: absolute; top: 150px; left: 20px;">Feld 1</div>
<div style="background: #33ff00; height: 80px; width: 80px; position: absolute; top: 200px; left: 200px;">Feld 2</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment