我如何风格jQuery draggable克隆?

前端之家收集整理的这篇文章主要介绍了我如何风格jQuery draggable克隆?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
如何用CSS样式jQuery draggable克隆?

解决方法

http://webdevel.blogspot.com/2008/09/jquery-ui-draggables-helper-css-class.html这可能是一个帮助

从上述网站引用:

While working with 07001 draggables,I have noticed that there does not seem to be a class associated with the draggable helper,and so it is styled in the same way as the draggable you selected. As a result you have to resort to the start function option to add the class dynamically:

  1. $(".dragme").draggable({helper: "clone",start: function(e,ui)
  2. {
  3. $(ui.helper).addClass("ui-draggable-helper");
  4. }
  5. });

As a result you have to resort to the start function option to add the class dynamically:

  1. .ui-draggable-helper {
  2. border: 1px dotted #000;
  3. padding: 6px;
  4. background: #fff;
  5. font-size: 1.2em;
  6. }

猜你在找的jQuery相关文章