简体   繁体   中英

Make dynamically added div draggable in IE8

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

Something like this:

function bind_draggable($el){
    $el.draggable({
        //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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM