Reputation: 2915
I am trying to use the jquery UI draggable option handle
, but not working, i tried :
$("div").draggable( { handle : $("#buttonid") })
Can anyody tell me the problem?
Edit
The handle is not actually working as a handle, means i want to drag handle
to drag div, but it is not working ?
Upvotes: 1
Views: 651
Reputation: 87083
$("div").draggable( {
handle : "#buttonid" // you need not to wrap with $()
});
I haven't tested this. As Button's default
event-handler
formousedown
. You might want to try withevent.preventDefault()
inside amousedown
handler or alternatively wrap that button with aspan
ordiv
and make thatdiv
orspan
as handler, But I think none of them will work.
For more look here
Upvotes: 3