Honlapkészítés Egyeteme/5.rész – JQuery, Subversion, XML, Django/példa
Megjelenés
<!DOCTYPE html>
<html>
<head>
<style>
div { width:60px; height:60px; margin:5px; float:left; }
</style>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>
<body>
<script>
$("div").click(function () {
var color = $(this).css("background-color");
$("#result").html("That div is " + color + ".");
});
</script>
</body>
</html>