开发者

need short line of code to enable jQuery drag and drop work on iphone?

I developed a w开发者_开发百科eb based game by use of jQuery drag and drop. As everyone knows that; jQuery drag and drop is not work on touch screen. Is there any short and simple code to enable work on iphone.

how to make the code below draggable work on touch devices such as iphone or ipad

 $(document).ready(function () {
        $("image").draggable({
            start: function (event, ui) {
                imgID = $(ui.helper)[0].id;

            }
        });

and for droppable:

     $("div#boardGame div").droppable({
            drop: function (event, ui) {
                game.WebService1.DoTurn(this.id,
                                              imgID,
                                              onDoTurn);


            }
        }); 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜