Вопрос

I'm trying to build a tic-tac-toe game for my first foray into jQuery and jCanvas and no matter what I try, I can't figure out how to bind mouse events to the canvas layers.

This is my code: https://github.com/DanSchmidt/ttt-js/blob/master/js/script.js

I was trying to do what is being done in this fiddle: http://jsfiddle.net/caleb531/SCNp7/5/

I've tried copying and pasting that part of the code even and it still doesn't work. I just can't see why that code should work in the fiddle and not in my own.

Это было полезно?

Решение

jCanvas events aren't available in the stable build yet. However, they are available in the latest beta build on GitHub (v5.2b):

https://github.com/caleb531/jcanvas

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top