Counter
How do I make an counter?
Experimenting with VueJS.. What is a counter? How do you make a counter? This script and codes were developed by Quincy Soeliman on 22 July 2022, Friday.
Counter - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Counter</title> <link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app"> <span v-on:click="downvote" class="downvote"><i class="fa fa-minus"></i></span> <p v-bind:style="{ color: color }">{{ count }}</p> <span v-on:click="upvote" class="upvote"><i class="fa fa-plus"></i></span>
</div> <script src='http://vuejs.org/js/vue.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Counter - Script Codes CSS Codes
html { height: 100%;
}
body { display: flex; justify-content: center; align-items: center; background: #2480B2; min-height: 100%;
}
#app { display: flex; justify-content: center; align-items: center;
}
#app span { display: flex; justify-content: center; align-items: center; width: 50px; height: 50px; color: #FFF3F2; border-radius: 50%; background: #4E8BB2; box-shadow: 2px 2px #0B75B2; transition: all 0.2s ease-in-out;
}
#app span i { font-size: 20px;
}
#app span:hover { cursor: pointer; background: #4187B2;
}
#app p { font-size: 50px; margin: 0; padding: 0 30px; -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}
#app p:hover { cursor: pointer;
}
Counter - Script Codes JS Codes
new Vue({ el: '#app', data: { count: 0, color: 'white' }, methods: { downvote: function() { if (!this.count) { this.color = '#B2261B'; } this.count--; }, upvote: function() { this.count++; if (this.count >= 0) { this.color = 'white'; } } }
});
Developer | Quincy Soeliman |
Username | quincysoeliman |
Uploaded | July 22, 2022 |
Rating | 3 |
Size | 2,601 Kb |
Views | 48,576 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CSS Rocket Ship | 3,714 Kb |
Datepicker | 1,358 Kb |
Drawing board | 1,985 Kb |
VueJS Multi Select | 1,772 Kb |
A Pen by Quincy Soeliman | 1,279 Kb |
VueJS Names | 1,608 Kb |
Car Animation | 2,238 Kb |
Firefox Breakout Guide | 2,576 Kb |
VueJS Task | 1,699 Kb |
ATM | 2,484 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
A Pen by Rob Levin | Roblevin | 2,787 Kb |
A Pen by Andrea Verlicchi | Verlok | 2,018 Kb |
Flat UI Button | Honchoman | 2,289 Kb |
SVG Animation | Pollardld | 3,133 Kb |
Savemedia1.1 | EdsonAlcala | 2,148 Kb |
Welcome | Nakome | 6,076 Kb |
Board Site | IndianaLuft | 10,542 Kb |
Hamburger Menu Animation | Salmanraza | 2,580 Kb |
BlueBox Fork | Huskynation | 12,675 Kb |
Scoreboard.js basic usage | Tbleckert | 1,733 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!