开发者

Make dynamically added div draggable in IE8

开发者 https://www.devze.com 2023-04-12 17:44 出处:网络
I have function which bind draggable functionality to newly added div. Something like this: function bind_draggable($el){

I have function which bind draggable functionality to newly added div.

Something like this:

function bind_draggable($el){
    $el.draggable({
 开发者_如何学Go       //options...
    });
}

var $container = $('#container'),
    $div = $(<some content here>);

$container.append($div);
bind_draggable($div);

It works fine in all browsers but fails in IE8. I tried to add ready() handler to $div, but this doesn't help too.


The reason why draggable doesn't work in IE < 9 is distance: 15 declaration in draggable options. In fact delay option is also incompatible with IE < 9

0

精彩评论

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

关注公众号