开发者

Draggable drags out contents instead of container

I have a draggable container that was working with jquery 1.3.2. I recently upgraded to jquery 1.5.1 and ui 1.8.13 from 1.7.1 and now all of a sudden certain draggable containers that used to drag the whole container and contents now only drags whatever is in the container.

For example

<div class="dragme" drag_action="hex" value="E7E7E7" id="default_color"><input type="text" maxlength="6" size="6" name="colorpick" id="colorpickerField1" value="0969A2" /&开发者_JS百科gt;</div>

This will drag the textbox input out instead of its container and textbox input together

I am initiating the drag with this function

 $(".dragme").draggable({

                        scroll: true, 
 scrollSensitivity: 100, 
 scrollSpeed: 100,
 cursorAt: { cursor: 'move', top: 27, left: 27 },
  helper : 'clone',                 // you will drag a copy of the item around
  revert : true,   
  start: function(e,ui){
   $(this).addClass('fade');        // fade out original item while dragging the clone
   ui.helper.find('.caption').text("I'm being dragged!"); // message in clone
  },
  stop: function(e,ui){
   $(this).removeClass('fade');     // remove fade if dragged item is released
  }
 });

Anyone have any ideas? Thanks in advance.


I upgraded to jquery 1.8.9 and now it works.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜