1

Basically, I'm trying to combine change image onclick with this jquery right mouse click plugin and it's kicking my butt.

I was able to get the change image onclick working, but when I try to combine it with the right click plugin, I get nothing. Also, my background is totes hosed and I don't know why or how to fix it.

I'm trying to make a mockup of a versus screen for a fighting game and I want the characters to appear on the left side of the screen for a left click and on the right for a right click. Help appreciated.

EDIT: Forgot to link to it ^^; This is the site in question

makine
  • 11
  • 3

1 Answers1

1

jQuery onclick events (and pretty much base JavaScript onclick events) will trigger and fire on both left and right mouse clicks. You may need to distinguish between the two for BOTH left functionality and right functionality (not just right click)

This might help you: How to distinguish between left and right mouse click with jQuery

Community
  • 1
  • 1
elzaer
  • 729
  • 7
  • 25
  • Well I'm trying to use onclick for the left click and a jquery plugin for the right click. I really don't know how to make it call it out. A series of "if else" statements? – makine Jul 01 '13 at 01:55
  • If you look into the link I posted you can do it without using an extra plugin for the right click. Use the same switch control structure to call the different functions. The switch control structure can help instead of multiple nested if statements – elzaer Jul 01 '13 at 02:02