Give help. Get help.

  • # March 2, 2013 at 6:48 pm


    I have started making a game with the HTML5 drag and drop. I tried it on my iPad and iPhone and did not work. This is a small part of my existing code;

    $(‘.characters’).bind(‘dragstart’, function(e){
    e.dataTransfer.setData(‘text’, $(this).attr(‘id’));
    position = $(this).parent().attr(‘id’);
    if ($(this).attr(‘class’) == turn) {
    console.log(‘carry on’);
    }else( console.log(“it is not your turn”) );
    In order to at touch events. Would I have to manipulate the above code so that it works for both, mouse and touch. Or to I have to create the touch script separately from the above. Or should I not use the HTML5 API at all and go for a js library that might have all the required gestures I need.

    This project started as a way for me to learn HTML5 drag and drop, so is this API limited only for the mouse?

    hope you can put me in the right direction


    # October 11, 2014 at 4:36 pm

    Check out this drag and drop engine. It has lots of really useful features and it works well on touch devices:

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.