Skip to content

Instantly share code, notes, and snippets.

@hemache
Forked from OmarBerrayti/istighfar.php
Last active December 15, 2015 02:29
Show Gist options
  • Save hemache/5187473 to your computer and use it in GitHub Desktop.
Save hemache/5187473 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Istighfar</title>
<style type="text/css">
.cases{
overflow: visible;
}
.cases .case{
float: left;
width: 50px;
height: 50px;
border: 1px solid #CCC;
list-style: none;
margin: 5px;
cursor: pointer;
}
.cases .case.active{
background: #EEE;
position: relative;
}
.cases .case.active::after{
position: absolute;
display: block;
width: 20px;
height: 20px;
background: rgb(139, 135, 135);
content: '';
top: 14px;
left: 14px;
border-radius: 100%;
}
</style>
</head>
<body>
<ul class="cases">
<? for ($i=0; $i <= 1000; $i++): ?>
<li class="case"></li>
<? endfor ?>
</ul>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script>
jQuery(function($){
$('.case').each(function(){
$(this).click(function(){
$(this).toggleClass('active');
});
});
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment