Hi,
I am a jquery-newbie. I am trying to setup a “geo-game”:
I want to ask the user in a “loop” for different countries like this:
-
“Click on Egypt”
if (e.key == ‘1’) {
// message “Ok”
// add one point
}
else {
// message “NOT Ok”
} -
“Click on Tunisia” …
-
“Click on Gambia” …
…
I was able to setup my imagemap with mapster:
$(document).ready(function() {
function geklickt (e){
//alert(typeof e.key); return string
$(‘.showme’).append(e.key+ ’ ');
}
$('img').mapster({
mapKey: 'ALT',
stroke: true,
strokeWidth: 2,
strokeColor: 'ff0000' ,
onConfigured: function(){
// howto set up "loop" for asking user here???
} ,
onClick: geklickt
});
});
(see my complete demo-example here: http://members.chello.at/~trinko/afrikademo/)
I dont know howto setup my “query-loop” as described above.
Thanks for any hints
Kurt