ajax voting buttons not working

Posted on 2010-11-12
Last Modified: 2012-05-10
I can't get these voting buttons to work for the life of me, the javascript just won't run and i can't figure out why 

I have it working fine on my site but it just won't run on this, i must be missing something, please let me know if you can find the problem

thanks :)
Question by:transitnetwork
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
LVL 82

Expert Comment

ID: 34125854
You have multiple javascript framework and use try to use the $ for jQuery.
Use jQuery instead

For example, replace :

$(".vote") by jQuery("vote")
LVL 82

Expert Comment

ID: 34125876
sorry :

$(".vote") by jQuery(".vote")

I miss the dot in the new one

Expert Comment

ID: 34125991
Your code must be right:
$(".vote") and whatever follow after.
Try put your 'vote' class in double quotes in your HTML code and everything should work fine.
If it doesn't, try to remove scriptaculous and leave jQuery. The issue is that prototype (scriptaculous uses prototype) 'hooks' native elements properties and that may make others libraries not to function well.
I suggest to stick to one library and use it. It may help reduce code collision. Try jQuery as leakim971 suggests.
Firebug will greatly improve your javascript debugging options, download it in case you don't have it.

Kind Regards
WordPress Tutorial 2: Terminology

An important part of learning any new piece of software is understanding the terminology it uses. Thankfully WordPress uses fairly simple names for everything that make it easy to start using the software.


Author Comment

ID: 34137296
changing the $ to jQuery and removing scriptaculous did nothing to resolve the problem

This is so strange.
LVL 82

Expert Comment

ID: 34137409
The previous error about the "vote" left.
You've new ones, for example it seems you don't have any submit_btn or reset_btn in your page...

Author Comment

ID: 34137443
My apologies i'm stripping out the code that's not needed, this is why you received an error regarding that other code
LVL 82

Expert Comment

ID: 34137582
see difference between $(".vote") and jQuery(".vote")

Author Comment

ID: 34137984
okay so it was the scriptaculous conflicting, but how do I keep both?

replacing $(".vote") by jQuery(".vote") does not make it work
LVL 82

Accepted Solution

leakim971 earned 250 total points
ID: 34138624

Author Closing Comment

ID: 34141322

Featured Post

[Live Webinar] The Cloud Skills Gap

As Cloud technologies come of age, business leaders grapple with the impact it has on their team's skills and the gap associated with the use of a cloud platform.

Join experts from 451 Research and Concerto Cloud Services on July 27th where we will examine fact and fiction.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to dynamically set the form action using jQuery.

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question