A Pen by Leta Keane

Thumbnail
This awesome code was written by letakeane, you can see more from this user in the personal repository.
You can find the original code on Codepen.io
Copyright letakeane ©

Technologies

  • HTML
  • CSS
  • JavaScript
<!DOCTYPE html>
<html lang="en" >

<head>
  <meta charset="UTF-8">
  <title>A Pen by  Leta Keane</title>
  
  
  
      <link rel="stylesheet" href="css/style.css">

  
</head>

<body>

  <div class="clickbox">
  0
</div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  
  

    <script  src="js/index.js"></script>




</body>

</html>

/*Downloaded from https://www.codeseek.co/letakeane/a-pen-by-leta-keane-wJpZVN */
.clickbox {
  display: flex;
  height: 300px;
  width: 300px;
  background-color: cornflowerblue;
  margin: auto;
  justify-content: center;
  align-items: center;
  font-family: sans-serif;
  font-size: 100px;
  color: white;
  line-height: 100%;
}

/*Downloaded from https://www.codeseek.co/letakeane/a-pen-by-leta-keane-wJpZVN */
var counter = 0
$('.clickbox').on('click', function(){
  counter++;
  $('.clickbox').text(counter);
});

Comments