私はSpot the Differenceゲームを作成していますが、それは動作していますが、次のように動作します。イメージが2つあり、5つの違いをクリックすると次のラウンドをプレイするかどうかを尋ねるメッセージが表示されます。Spot the Differenceゲーム(javascript)
私の質問は...どのようにして次のレベルと異なる2つのイメージと異なる違いを持つものを "再起動"できますか?私は、これは私の実際のコードですべてが同じページで発生したい、私は2番目のレベルを示すために、別のHTMLページに行きたくない...
:)
http://codepen.io/anon/pen/RoYRZq
$(document).ready(function() {
// When clicked, show difference
$('#transparentmap AREA').click(function() {
var theDifference = '#'+$(this).attr('id')+'-diff';
$(theDifference).css('display', 'inline');
$(theDifference).data('clicked', true);
// When all differences selected/clicked, show email submission form
if($('#camera-diff').data('clicked') && $('#down-diff').data('clicked') && $('#eye-diff').data('clicked') && $('#flour-diff').data('clicked') && $('#uni-diff').data('clicked')) {
$('#form_container').css('display', 'inline');
}
});
});
ご協力いただきありがとうございます。