SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    how to "wait" for user-interaction in a jquery-plugin (mapster)

    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:
    1) "Click on Egypt"
    if (e.key == '1') {
    // message "Ok"
    // add one point
    }
    else {
    // message "NOT Ok"
    }

    2) "Click on Tunisia" ...
    3) "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

  2. #2
    SitePoint Member
    Join Date
    Oct 2002
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    solved


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •