Guest User

Untitled

a guest
Mar 13th, 2018
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  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. };
Add Comment
Please, Sign In to add comment