Lekcja 1 - ćwiczenia i zadanie

This commit is contained in:
floriano committed 2026-09-13 18:22:03 +02:00
1 parent 1c1d616161
commit 28836af2ee
9 files changed
+9946

No files matched your search

+30
View File
@@ -0,0 +1,30 @@
<!DOCTYPE html>
<html lang="pl">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>jQuery Lekcja 1</title>
<script src="lib/jquery.js"></script>
<script>
$(document).ready(function () {
let left = true
$("#d1").on("click", function() {
left ? $("#d1").css("float", "right") : $("#d1").css("float", "left")
left = !left
})
})
</script>
<style>
#d1 {
width: 100px;
height: 100px;
background-color: blue;
float: left;
}
</style>
</head>
<body>
<div id="d1"></div>
</body>
</html>