Loading...
Copy code
Close
Permalink
Close
Please tell us why you want to mark the subject as inappropriate.
(Maximum 200 characters)
Report Inappropriate
Cancel
Private Message
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Cancel
From :
guest
To :
Subject :
Content :
Type the characters you see in the picture below.
Send
Update
Cancel
Feedback
Email ID
Subject :
Comments :
Send
Cancel
Private Message
Type the characters you see in the picture below.
Type the characters you see in the picture below.
Attach files
Desktop
Google Docs
Each Attachment size should not exceed 1.0 MB.
Max no of attachments : 3
Loading User Profile...
guest
Response title
This is preview!
Attachments
Publish
Back to edit
Cancel
(
)
Sign In
New to this Portal? Click here to
Sign up
You can also use the below options to login
Login with Facebook
Login with Google
Login with Yahoo
jQuery
Plugins
UI
Meetups
Forum
Blog
About
Donate
All Forums
Recent Posts
Log In
Search
jQuery
Search
jQuery Forum
Move this topic
Forum :
Getting Started
Using jQuery
Using jQuery Plugins
Using jQuery UI
Developing jQuery Core
Developing jQuery Plugins
Developing jQuery UI
QUnit and Testing
About the jQuery Forum
jQuery Conferences
jQuery Mobile
Developing jQuery Mobile
Sub forum :
Move this topic
Cancel
Using jQuery UI
jphalip
Bug? Draggable and unbind.
in
Using jQuery UI
•
12 years ago
Hi,
I've noticed that if you make an object draggable and then unbind it, you can't make it draggable any more. See sample code below.
<ul id="foo">
<li id="bar">bar</li>
<li id="baz">baz</li>
</ul>
<script type="text/javascript">
$(document).ready(function() {
$("#bar").draggable(); // Can drag
$("#bar").unbind();
$("#bar").draggable(); // Can't drag any more
});
</script>
Is that a bug?
Cheers,
Julien
1
Replies(3)
ollie2893
Re: Bug? Draggable and unbind.
12 years ago
Not a bug. Your use of unbind() is just pretty indiscriminate. When using unbind(), I am usually careful to
specify the event AND the handler I want to get rid of, lest I end up in your situation and kill other people's event handlers...
Leave a comment on ollie2893's reply
jphalip
Re: Bug? Draggable and unbind.
12 years ago
Sure but in this case I do want to kill every event attached to this object. And then I want to re-attach a draggable functionality to the object. Why can't that be done, and is there a way around?
Kevin B
Re: Re: Bug? Draggable and unbind.
12 years ago
you would need to remove draggable from it before you add draggable back to it. draggable is not an event, it is a widget.
$("#bar").draggable("destroy");
-- Kevin
------------------------------------------------
http://www.tentonaxe.com
- jQuery Snippets and Tutorials
Leave a comment on jphalip's reply
Change topic type
Topic Type :
Discussions
Questions
Ideas
Problems
No of days :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Change topic type
Cancel
Link this topic
Provide the permalink of a topic that is related to this topic
Permalink
Save
Close
Reply to jphalip's question
Top
Reply
{"z2951381":[14737000001194088,14737000001197588],"z3045853":[14737000001197568],"z3123152":[14737000001197592]}
Statistics
3
Replies
9163
Views
0
Followers
Tags
Cancel
unbind
draggable
Actions
Permalink