How does it work?
To equip your website with the functionalities needed to vote you only have to load two Javascript files. After that you need to place a DIV element at the point at which the Voting Widget will appear.
Is it possible to make it even easier for me?
Yes. If you own a Wordpress Blog u can install our
Wordpress Plugin from the Wordpress Plug Directory.
The Plugin will do all the following necessary steps automatically and appends a voting widget at the bottom of your pages.
Html Example
<html>
<head>
<title>Your Page Title</title>
<script type="text/javascript" language="javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" language="javascript" src="http://topvotes.appspot.com/src/widget.js"></script>
</head>
<body>
<h1>Topvotes</h1>
<div class="topvotes-widget-vote"></div>
</body>
</html>
Description
-
The topvotes.appspot.com vote widget is based on jQuery. A fast, concise, library that simplifies how to traverse HTML documents, handle events, perform animations, and add AJAX.
If you are already loading a jQuery Library you dont need to implement this file. If you are not shure you can try to load the topvotes widget Javascript file only.
-
widget.js (The topvotes.appspot.com vote widget.)
The widget.js is a compilation of the topvotes "widget-core.js" and the topvotes "widget-layout-base.js".
This library contains also the needed graphics and Html Template for the vote Widget. This technique reduces the web requests from three to one. So the voting widget can appear significantly more quickly.
-
<div class="topvotes-widget-vote"></div>
This is the widget container.
-
Results from the example code.
Create your own
It is always cool to have a unique layout. It is possible to personalize the Vote widget, so it can be embedded well into the layout of your website.
Do you want to know more?