41 lines
631 B
HTML
Executable file
41 lines
631 B
HTML
Executable file
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<style>
|
|
.voter {
|
|
font-family: Consolas, "Lucida Console", monospace;
|
|
font-size: 18px;
|
|
}
|
|
.up, .down {
|
|
cursor: pointer;
|
|
color: blue;
|
|
font-weight: bold;
|
|
}
|
|
</style>
|
|
<script src="http://code.jquery.com/jquery.min.js"></script>
|
|
</head>
|
|
<body>
|
|
|
|
<div id="voter" class="voter">
|
|
<span class="down">—</span>
|
|
<span class="vote">0</span>
|
|
<span class="up">+</span>
|
|
</div>
|
|
|
|
<script>
|
|
function Voter(options) {
|
|
// ... ваш код
|
|
}
|
|
|
|
var voter = new Voter({
|
|
elem: $('#voter')
|
|
});
|
|
|
|
voter.setVote(1);
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|
|
|