0% found this document useful (0 votes)
23 views

Lecture 113 - Changing Styles - Changingcssdothtml

This document contains HTML and CSS code defining two shapes - a green circle and two red squares. The JavaScript code makes the squares fade out when the circle is clicked.

Uploaded by

srikantheswar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views

Lecture 113 - Changing Styles - Changingcssdothtml

This document contains HTML and CSS code defining two shapes - a green circle and two red squares. The JavaScript code makes the squares fade out when the circle is clicked.

Uploaded by

srikantheswar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Changing Styles: changingcss.

html
!
!
<!doctype html>

<html>

<head>

<title>Learning jQuery</title>

<meta charset="utf-8" />

<meta http-equiv="Content-type" content="text/html; charset=utf-8" />

<meta name="viewport" content="width=device-width, initial-scale=1" />

<script type="text/javascript" src="jquery.min.js"></script>

<style>

#circle {

width:200px;

height:200px;

background-color:green;

border-radius:100px;

.square {

width:300px;
height:300px;

background-color:red;

margin-top:10px;

</style>

</head>

<body>

<div id="circle"></div>

<div class="square"></div>

<div class="square"></div>

<script>

$("#circle").click(function() {

$(".square").fadeOut();

});

</script>

</body>

</html>

You might also like