make input element draggable after disabling it
来源:互联网 发布:剑三成男捏脸数据大 编辑:程序博客网 时间:2024/06/05 15:28
make input element draggable after disabling it
up vote0down votefavorite
I have an <input>
element which I have "disabled" (using disabled:true
) and for which I have removed selection (using .disableSelection()
).
The <input>
element is therefore not much more than a picture: non-interactive pixels. Because of that, I should be able to make the element draggable, as there is no chance of conflict with any anotherclick
event.
I've tried .draggable()
naively, but that doesn't work: http://jsfiddle.net/E26dY/
1 Answer
activeoldestvotes
up vote2down vote
First you need to un-disable input
and then use .draggable({cancel: null})
in your js. Live example: http://jsfiddle.net/E26dY/8/
HTML:
<input />
jQuery/JavaScript:
$('input').val('Drag me!').disableSelection().css('webkit-user-select','none').draggable({cancel: null});
- make input element draggable after disabling it
- Draggable
- replaced element ,input,select
- Android Build with Gradle and ProGuard : “The output jar must be specified after an input jar, or it
- make IT different
- Make it easy
- Make it easy
- Make it easysdf
- Make it easysdf
- Make it easysdf
- Make it Anagram
- Error parsing XML: junk after document element
- SyntaxError: missing ] after element list 火狐问题
- SyntaxError: missing ] after element list 解决方案
- JQuery遍历取element after the specified element
- Find the element before and after a specific element
- Make Your Game Input Robust
- I Can Make It Happen
- Android自动测试之monkeyrunner工具
- Css Sprites
- 18个扩展让你的Firefox成为渗透测试工具
- 我想下载
- Secure CRT 乱码问题解决
- make input element draggable after disabling it
- 黑马程序员_7K月薪面试题之_银行业务调度系统
- <label>标签for属性的妙用
- Eclipse build error 解决方法The library '*.jar' contains native libraries that will not run on the dev
- ios的NSMutableString用法
- 黑马程序员_Java高新技术_增强for循环
- Linux查看CPU和内存使用情况
- object-c 深复制和浅复制
- linux设备驱动归纳总结(二):模块的相关基础概念