draggable("disable") problem
Hi,
i'd like to stop a draggable element after a clic on a button. I tryed
to use the draggable("disable") but it doesn't really work.
Here's my source :
//Script
$(document).ready(function(){
$(".block").draggable();
$(".stop").click(function(e){
$(".block").draggable("disable");
});
$(".Go").click(function(){ // lorsque je clic sur le bouton Go
$(".block").draggable("enable");
});
});
//HTML
<div class="block">drag me!</div>
<input type="button" name="stop" value="stop" class="stop"/>
<input type="button" name="Go" value="Go" class="Go"/>
It's really simple but i can't make it, if anyone got a solution ...
Thanks