开发者

jQuery drag & drop works in html

Does jQuery drag &开发者_JAVA技巧amp; drop functionality work on HTML as well? I used button tags and used same drag & drop jQuery function to get it work. But unfortunately it does not work? Is it possible to call drag & drop functions for HTML buttons? I would be glad if you can help me. Here is the code that I used for that.

alert("inside script");

$().ready(function() {
    alert("inside function");
    $("#submitme").draggable({revert: "invalid"});
    $("#button2").draggable({revert: "invalid"});
    $("#textarea1").droppable({
        accept: function(d)  {
            alert("droppable");
            if((d.attr("id")=="button2")){
                return true;
            }
        }
    });

    alert("after script");
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜