Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<!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