There are a few formatting issues with your HTML, as well as an issue with the class names you're using. You need to add a space before type="button"
, and also class names starting with numbers cause issues with CSS selectors—they must start with letters (a-z), an underscore, or a hyphen in order to use the standard .classname
or #classname
selectors in your CSS files (see here), so I'd recommend changing 0rope to rope0, etc:
<input name="rope0" class="css3button rope0" type="button" value="0" />
<input name="rope1" class="css3button rope1" type="button" value="1" />
<input name="rope2" class="css3button rope2" type="button" value="2" />
<input name="rope3" class="css3button rope3" type="button" value="3" />
Also, in your jQuery selectors (the code inside the $('')
call), you have .input
at the beginning of the selector. This will make jQuery look for elements with an input
class on them, eg class="css3button rope0 input"
. To make it look for <input>
elements, simply remove the leading .
:
$("input.css3button.rope0").click(function(){