Permalink
Browse files

initial commit

  • Loading branch information...
0 parents commit f0dc78ccaffd2219404d780a9f603e5506144308 @benbalter benbalter committed Sep 17, 2012
Showing with 557 additions and 0 deletions.
  1. +16 −0 css/style.css
  2. +18 −0 js/js.dev.js
  3. +474 −0 kickstart.php
  4. +23 −0 readme.md
  5. +5 −0 templates/ballot.php
  6. +21 −0 templating.php
@@ -0,0 +1,16 @@
+.kickstart-ballot { float: left; width: 50px; border: 1px solid #ccc; padding: 5px 0 5px 5px; margin-right: 10px; }
+
+.kickstart-ballot .kickstart-vote {
+ width: 0;
+ height: 0;
+ border-left: 10px solid transparent;
+ border-right: 10px solid transparent;
+ float: left;
+ cursor: pointer;
+ clear: both;
+ margin-right: 10px;
+}
+
+.kickstart-ballot .up { border-bottom: 10px solid green; margin-bottom; 5px; }
+.kickstart-ballot .down { border-top: 10px solid red; margin-top: 5px; }
+.kickstart-ballot .kickstart-score { font-weight: bold; }
@@ -0,0 +1,18 @@
+jQuery(document).ready(function($){
+
+ $('.kickstart-vote').click( function(){
+
+ var score = $(this).siblings( '.kickstart-score');
+
+ $.ajax({
+ url: kickstart.ajaxEndpoint,
+ data: {
+ direction: $(this).attr( 'data-vote-direction' ),
+ action: 'kickstart_vote',
+ post_ID: $(this).parent().attr( 'data-post-id' )
+ },
+ success: function( data ) { score.text( data ); }
+ })
+ });
+
+});
Oops, something went wrong.

0 comments on commit f0dc78c

Please sign in to comment.