Skip to content

Instantly share code, notes, and snippets.

@OmarBerrayti
Created March 18, 2013 13:30
Show Gist options
  • Save OmarBerrayti/5187132 to your computer and use it in GitHub Desktop.
Save OmarBerrayti/5187132 to your computer and use it in GitHub Desktop.
Just a little test for an Istighfar
<!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;
}
.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">
<?php
for ($i=0; $i <= 1000; $i++) {
echo '<li class="case"></li>';
}
?>
</ul>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script type="text/javascript">
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