Stack Overflow Like jQuery Voting Widget - Upvote

Stack Overflow Like jQuery Voting Widget - Upvote
File Size: 119 KB
Views Total:
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   

Upvote is a lightweight and fast jQuery plugin that allows you to create a Stack Exchange style rating system on your website, similar to the Stack Overflow.

You might also like:

Basic Usage:

1. Include the latest jQuery library and jQuery Upvote on the website

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.1/jquery.min.js"></script>
<script src="lib/jquery.upvote.js"></script>

2. Include jQuery Upvote CSS to style the plugin

<link rel="stylesheet" href="lib/jquery.upvote.css">

3. Create a container for the widget

<div id="topic" class="upvote">
    <a class="upvote"></a>
    <span class="count">0</span>
    <a class="downvote"></a>
    <a class="star"></a>
</div>

4. Call the plugin.

$('#topic').upvote({count: 5, upvoted: 1});

Changelog:

2018-12-12

  • Added vanilla JS version: upvote.vanilla.js

2018-12-05

v1.1.1 (2016-08-04)

  • Updated depricated function.

v1.1 (2014-02-10)

  • renamed .upvoted .downvoted .starred to .upvote-on .downvote-on .star-on

v1.0.2 (2013-08-31)

  • handle negative count properly during initialization

This awesome jQuery plugin is developed by janosgyerik. For more Advanced Usages, please check the demo page or visit the official website.