javascript - border color change is working only for first time -
i trying make javascript based small game.
here fiddle game
it working except few issues:-
on click of
td
, if image intd
, cell border color should green otherwise if have clicked on wrongtd
, border color turns red.
functionality working first time start game. next time showing red border color.till level 8, changing of border color visible, increase level, user cannot experience whether has hit correct cell or not. want have hit correct cell, color change should visible , stable until image appears cell.
any improvement in code , suggestion appreciable.
when start game second time, call startgame()
.
in startgame()
have $('td').click()
, fire second time, on each click, actual click twice (one catch, 1 miss).
Comments
Post a Comment