daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Mar 13th, 2018 54 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. window.addEvent("domready", function(){
  2.  
  3.   $$('a.vote').each(function(a){
  4.     vote(a)
  5.   });
  6.  
  7. });
  8.  
  9. function vote(a){
  10.  
  11.   a.addEvent("click",function(evt){
  12.     evt.stop();
  13.     alert(a);
  14.     var url = a.getProperty('href');
  15.     alert(url);
  16.     new Ajax(url, {
  17.       method: 'get',
  18.       update: $('score'),
  19.       onComplete: function(response){
  20.         alert(response);}
  21.     }).request();
  22.   });
  23.  
  24. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top