Class-4| Best Jquery Tutorial | Jquery Assignment Dynamic Class|Jquery Full Course | Jquery advanced

preview_player
Показать описание
<!-- Note: just find and Replace < with Lesser than sign and > with Greater than Sign -->
<html>
<head>
<title>Jquery</title>
<style>
.div1,.div2,.div3,.div4{
width:200px;
height:200px;
background-color: red;
float:left;
margin:5px;
}
</style>
<script>
var i=1;
$
(
function()
{
$('.ck').click(function(){
$('.div'+i).hide();
i=i+1;
})
}
)
</script>
</head>
<body>
<div class="div1"></div>
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>
<input type="button" value="Click Me" class="ck"/>
</body>
</html>
Рекомендации по теме