开发者

jQuery UI .draggable() causing problems in IE

http://www.madeupuniverse.com/ls-app-test/ls-app.html

I have tested this app in all browsers, and IE is the only one that gives me problems (开发者_开发知识库of course). I am testing in IE 8. The debugger gives me this error...'data(...).options' is null or not an object - jquery-ui-1.8.13.custom.min.js, line 106 character 59... it also gives me this error... '_cursor' is null or not an object - jquery-ui-1.8.13.custom.min.js, line 106 character 99.

Is this a bug with the jQuery UI or is there something that can fix this. I have tried alot of different things but nothing has worked.

I am using jQuery UI 1.8.13 and jQuery 1.5.1.


IE will choke on trailing commas in object declarations. There is one in the

.draggable({
    drag: function(event, ui){
    },   <--- this comma kills IE
});

declaration, and another right before the

//END drop section of .droppable()

comment


I had this issue and fixed it. My problem was this:

function onDrop(event,ui) {
  var handle = $(ui.draggable);
  handle.remove();

  *blahh. blahh..*

  $.ajax( 

     *blah.. blah..*

     success: function (data) { *whatever....* });

}

The problem is that IE9 has no problem with this drop handler, but IE8 will crash. I changed my .remove() inside the success event of my ajax call and it worked. I guess that you can't delete the handle from the ondrop event if you don't have an ajax call where you can put the remove() try with a timer...

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜